Bladeren bron

Merge branch 'upgrade-to-grunt-0.4' of https://github.com/boazsender/reveal.js into dev

Hakim El Hattab 13 jaren geleden
bovenliggende
commit
9f1c5a0cea
2 gewijzigde bestanden met toevoegingen van 53 en 51 verwijderingen
  1. 21 22
      gruntfile.js
  2. 32 29
      package.json

+ 21 - 22
grunt.js → 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' ] );
 
 };
+ 

+ 32 - 29
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"
+  }
 }

PANIC: session(release): write data/sessions/8/f/8f25b60bb3023153: no space left on device

PANIC

session(release): write data/sessions/8/f/8f25b60bb3023153: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)