aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoaz Sender <boaz@gallina.(none)>2013-02-27 02:26:24 -0500
committerBoaz Sender <boaz@gallina.(none)>2013-02-27 09:23:40 -0500
commit14105feb102829a42e8ef2a213ea88f896bea26d (patch)
treebe976e9b339e3fea99ebadabcdcddc127e34e0e8
parenta9b4eb9a05b25cf39ce0c479d95a7b5f4d3a0c73 (diff)
downloadperl-software-in-gnu-guix-14105feb102829a42e8ef2a213ea88f896bea26d.tar
perl-software-in-gnu-guix-14105feb102829a42e8ef2a213ea88f896bea26d.tar.gz
upgrading to grunt 0.4. resolves #349.
-rw-r--r--gruntfile.js (renamed from grunt.js)43
-rw-r--r--package.json61
2 files changed, 53 insertions, 51 deletions
diff --git a/grunt.js b/gruntfile.js
index 00f4350..bb86019 100644
--- a/grunt.js
+++ b/gruntfile.js
@@ -3,19 +3,11 @@ module.exports = function(grunt) {
// Project configuration
grunt.initConfig({
- pkg: '<json:package.json>',
-
- inputJS: 'js/reveal.js',
- inputCSS: 'css/reveal.css',
-
- outputJS: 'js/reveal.min.js',
- outputCSS: 'css/reveal.min.css',
-
+ pkg: grunt.file.readJSON('package.json'),
meta: {
- version: '2.3',
banner:
'/*!\n' +
- ' * reveal.js <%= meta.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +
+ ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +
' * http://lab.hakim.se/reveal-js\n' +
' * MIT licensed\n' +
' *\n' +
@@ -23,8 +15,8 @@ module.exports = function(grunt) {
' */'
},
- lint: {
- files: [ 'grunt.js', '<%= inputJS %>' ]
+ jshint: {
+ files: [ 'gruntfile.js', 'js/reveal.js' ]
},
// Tests will be added soon
@@ -32,17 +24,20 @@ module.exports = function(grunt) {
files: [ 'test/**/*.html' ]
},
- min: {
- dist: {
- src: [ '<banner:meta.banner>', '<%= inputJS %>' ],
- dest: '<%= outputJS %>'
- }
+ uglify: {
+ options: {
+ banner: '<%= meta.banner %> \n'
+ },
+ build: {
+ src: 'js/reveal.js',
+ dest: 'js/reveal.min.js'
+ }
},
- mincss: {
+ cssmin: {
compress: {
files: {
- '<%= outputCSS %>': [ '<%= inputCSS %>' ]
+ 'css/reveal.min.css': [ 'css/reveal.css' ]
}
}
},
@@ -69,16 +64,20 @@ module.exports = function(grunt) {
},
watch: {
- files: [ 'grunt.js', '<%= inputJS %>', '<%= inputCSS %>' ],
+ files: [ 'gruntfile.js', 'js/reveal.js', 'css/reveal.css' ],
tasks: 'default'
}
});
// Dependencies
- grunt.loadNpmTasks( 'grunt-contrib-mincss' );
+ grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+ grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
+ grunt.loadNpmTasks( 'grunt-contrib-uglify' );
+ grunt.loadNpmTasks( 'grunt-contrib-watch' );
// Default task
- grunt.registerTask( 'default', [ 'lint', 'mincss', 'min' ] );
+ grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify' ] );
};
+ \ No newline at end of file
diff --git a/package.json b/package.json
index 3164f04..e9ab1e1 100644
--- a/package.json
+++ b/package.json
@@ -1,31 +1,34 @@
{
- "name": "reveal.js",
- "version": "2.3.0",
- "description": "The HTML Presentation Framework",
- "homepage": "http://lab.hakim.se/reveal-js",
- "author": {
- "name": "Hakim El Hattab",
- "email": "hakim.elhattab@gmail.com",
- "web": "http://hakim.se"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/hakimel/reveal.js.git"
- },
- "engines": {
- "node": "~0.8.0"
- },
- "scripts": {
- "test": "grunt lint qunit"
- },
- "dependencies": {
- "underscore" : "~1.3.3",
- "express" : "~2.5.9",
- "socket.io" : "~0.9.6",
- "mustache" : "~0.4.0"
- },
- "devDependencies": {
- "grunt-contrib-mincss": "~0.3.1",
- "grunt": "~0.3.17"
- }
+ "name": "reveal.js",
+ "version": "2.3.0",
+ "description": "The HTML Presentation Framework",
+ "homepage": "http://lab.hakim.se/reveal-js",
+ "author": {
+ "name": "Hakim El Hattab",
+ "email": "hakim.elhattab@gmail.com",
+ "web": "http://hakim.se"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hakimel/reveal.js.git"
+ },
+ "engines": {
+ "node": "~0.8.0"
+ },
+ "scripts": {
+ "test": "grunt lint qunit"
+ },
+ "dependencies": {
+ "underscore": "~1.3.3",
+ "express": "~2.5.9",
+ "socket.io": "~0.9.6",
+ "mustache": "~0.4.0"
+ },
+ "devDependencies": {
+ "grunt-contrib-jshint": "~0.2.0",
+ "grunt-contrib-cssmin": "~0.4.1",
+ "grunt-contrib-uglify": "~0.1.1",
+ "grunt-contrib-watch": "~0.2.0",
+ "grunt": "~0.4.0"
+ }
}