diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Gruntfile.js | 64 | ||||
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | package.json | 10 | ||||
-rw-r--r-- | www/index.html | 20 |
5 files changed, 84 insertions, 19 deletions
@@ -1 +1,4 @@ contrib/Pflichtenheft-Peter.pdf +node_modules +www/js/rhwebimport.* +www/styles/rhwebimport.* diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..4993def --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,64 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + concat: { + js: { + src: [ + 'www/js/dropzone.js', + 'www/js/apps.js', + 'www/js/auth.js', + 'www/js/clock.js', + 'www/js/importer.js', + 'www/js/jingles.js', + 'www/js/musicgrid.js', + 'www/js/musicpools.js', + 'www/js/rivendell.js', + 'www/js/rivendell.rh.js', + 'www/js/shows.js', + 'www/js/utils.js' + ], + dest: 'www/js/<%= pkg.name %>.js' + }, + css: { + src: [ + 'www/styles/auth.css', + 'www/styles/jingles.css', + 'www/styles/main-style.css', + 'www/styles/musicgrid.css', + 'www/styles/shows.css' + ], + dest: 'www/styles/<%= pkg.name %>.css' + } + }, + uglify: { + options: { + banner: '/*! <%= pkg.name %> */\n' + }, + build: { + src: 'www/js/<%= pkg.name %>.js', + dest: 'www/js/<%= pkg.name %>.min.js' + } + }, + cssmin: { + target: { + files: [{ + expand: true, + cwd: 'www/styles', + src: '<%= pkg.name %>.css', + dest: 'www/styles', + ext: '.min.css' + }] + } + } + }); + + // Load the plugin that provides the "uglify" task. + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + + // Default task(s). + grunt.registerTask('default', ['concat', 'uglify', 'cssmin']); +}; @@ -31,7 +31,7 @@ LICENSE Installation ============ -# sudo aptitude install apache2 libapache2-mpm-itk libapache2-mod-perl2 libconfig-inifiles-perl libdbd-mysql-perl libjson-pp-perl libxml-quote-perl librhrd-perl libjs-jquery rivendell-server +# sudo aptitude install apache2 libapache2-mpm-itk libapache2-mod-perl2 libconfig-inifiles-perl libdbd-mysql-perl libjson-pp-perl libxml-quote-perl librhrd-perl libjs-jquery rivendell-server npm # sudo a2enmod ssl authnz_ldap perl proxy_wstunnel # sudo /etc/init.d/apache2 restart @@ -86,3 +86,7 @@ add the following to the virtualhost config: AliasMatch "^/(js|img|styles)(.*)" "/var/www/rhwebimport/www/$1$2" AliasMatch "^(.*)" "/var/www/rhwebimport/www/index.html" ~~~/snip~~~ + +# npm install +# npm install -g grunt-cli +# grunt diff --git a/package.json b/package.json new file mode 100644 index 0000000..6c0d39d --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "name": "rhwebimport", + "version": "0.0.1", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-contrib-concat": "^0.5.1", + "grunt-contrib-cssmin": "^0.14.0", + "grunt-contrib-uglify": "^0.11.1" + } +} diff --git a/www/index.html b/www/index.html index 2a3f28f..aa780d9 100644 --- a/www/index.html +++ b/www/index.html @@ -9,26 +9,10 @@ <link rel="shortcut icon" href="/img/favicon.ico" /> <link href="/javascript/bootstrap/css/bootstrap.css" rel="stylesheet"> - <link href="/styles/main-style.css" rel="stylesheet"> - <link href="/styles/auth.css" rel="stylesheet"> - <link href="/styles/shows.css" rel="stylesheet"> - <link href="/styles/jingles.css" rel="stylesheet"> - <link href="/styles/musicpools.css" rel="stylesheet"> - <link href="/styles/musicgrid.css" rel="stylesheet"> + <link href="/styles/rhwebimport.css" rel="stylesheet"> <script src="/javascript/jquery/jquery.min.js"></script> <script src="/javascript/bootstrap/js/bootstrap.min.js"></script> - <script src="/js/dropzone.js"></script> - <script src="/js/rivendell.js"></script> - <script src="/js/rivendell.rh.js"></script> - <script src="/js/utils.js"></script> - <script src="/js/clock.js"></script> - <script src="/js/importer.js"></script> - <script src="/js/auth.js"></script> - <script src="/js/apps.js"></script> - <script src="/js/shows.js"></script> - <script src="/js/jingles.js"></script> - <script src="/js/musicpools.js"></script> - <script src="/js/musicgrid.js"></script> + <script src="/js/rhwebimport.js"></script> </head> <body> |