Last active
August 29, 2015 14:18
-
-
Save automaticgiant/2df64c748bcdfc8103d2 to your computer and use it in GitHub Desktop.
Revisions
-
automaticgiant revised this gist
Apr 21, 2015 . 2 changed files with 33 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,31 @@ module.exports = function (grunt) { var assignment = 'HW5'; var files = [assignment + '.html', assignment + '.css', assignment + '.js'] var addr; var lookup = require('deasync')(require('dns').lookup); addr = lookup(require('os').hostname()); // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), connect: { options: { port: 8080, base: './', hostname: addr, livereload: true }, server: { options: { hostname: addr } }, local: { options: { hostname: 'localhost' } } }, @@ -16,14 +34,18 @@ module.exports = function (grunt) { reload: true, livereload: true }, hw5: { files: ['Gruntfile.js'].concat(files) }, hw5pack: { files: files , tasks: ['shell:package'] , debounceDelay: 5000 } }, shell: { package: { command: 'jar cvf ' + assignment + 'kp1108.jar ' + files.join(' ') } } }); @@ -36,4 +58,4 @@ module.exports = function (grunt) { grunt.registerTask('default', ['shell:package', 'connect', 'watch']); // grunt.registerTask('package') }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ { "name": "hw5", "version": "1.0.0", "description": "cs3744 hw5", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "grunt" @@ -13,6 +13,7 @@ "grunt": "^0.4.5", "grunt-contrib-connect": "^0.10.1", "grunt-contrib-watch": "^0.6.1", "grunt-shell": "^1.1.2", "deasync": "0.0.10" } } -
automaticgiant created this gist
Apr 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ module.exports = function (grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), connect: { server: { options: { port: 8080, base: './' } } }, watch: { options: { reload: true, livereload: true }, hw4: { files: ['Gruntfile.js', 'HW4.*'], tasks: ['shell:package'] } }, shell: { package: { command: 'jar cvf HW4kp1108.jar HW4.html HW4.css HW4.js' } } }); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-shell'); // Default task(s). grunt.registerTask('default', ['shell:package', 'connect', 'watch']); // grunt.registerTask('package') }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ { "name": "hw4", "version": "1.0.0", "description": "cs3744 hw4", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "grunt" }, "author": "automaticgiant", "license": "GPLv2", "dependencies": { "connect": "^3.3.5", "grunt": "^0.4.5", "grunt-contrib-connect": "^0.10.1", "grunt-contrib-watch": "^0.6.1", "grunt-shell": "^1.1.2" } }