Bladeren bron

add package and serve grunt tasks (closes #437)

Hakim El Hattab 13 jaren geleden
bovenliggende
commit
7c9b3421a2
2 gewijzigde bestanden met toevoegingen van 30 en 0 verwijderingen
  1. 28 0
      Gruntfile.js
  2. 2 0
      package.json

+ 28 - 0
Gruntfile.js

@@ -75,6 +75,26 @@ module.exports = function(grunt) {
 			files: [ 'Gruntfile.js', 'js/reveal.js' ]
 		},
 
+		connect: {
+			server: {
+				options: {
+					port: 8000,
+					base: '.'
+				}
+			}
+		},
+
+		zip: {
+			'reveal-js-presentation.zip': [
+				'index.html',
+				'css/**',
+				'js/**',
+				'lib/**',
+				'images/**',
+				'plugin/**'
+			]
+		},
+
 		watch: {
 			main: {
 				files: [ 'Gruntfile.js', 'js/reveal.js', 'css/reveal.css' ],
@@ -94,6 +114,8 @@ module.exports = function(grunt) {
 	grunt.loadNpmTasks( 'grunt-contrib-uglify' );
 	grunt.loadNpmTasks( 'grunt-contrib-watch' );
 	grunt.loadNpmTasks( 'grunt-contrib-sass' );
+	grunt.loadNpmTasks( 'grunt-contrib-connect' );
+	grunt.loadNpmTasks( 'grunt-zip' );
 
 	// Default task
 	grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify' ] );
@@ -101,4 +123,10 @@ module.exports = function(grunt) {
 	// Theme task
 	grunt.registerTask( 'themes', [ 'sass' ] );
 
+	// Package presentation to archive
+	grunt.registerTask( 'package', [ 'default', 'zip' ] );
+
+	// Serve presentation locally
+	grunt.registerTask( 'serve', [ 'connect', 'watch' ] );
+
 };

+ 2 - 0
package.json

@@ -32,6 +32,8 @@
     "grunt-contrib-uglify": "~0.1.1",
     "grunt-contrib-watch": "~0.2.0",
     "grunt-contrib-sass": "~0.2.2",
+    "grunt-contrib-connect": "~0.2.0",
+    "grunt-zip": "~0.7.0",
     "grunt": "~0.4.0"
   },
   "licenses": [

PANIC: session(release): write data/sessions/0/0/00c1e13be8195713: no space left on device

PANIC

session(release): write data/sessions/0/0/00c1e13be8195713: 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)