Permalink
Browse files

Use grunt to compress ZVM

  • Loading branch information...
curiousdannii committed Mar 24, 2013
1 parent e8fd786 commit 1281ffc41790a4a9b796c1e33d67dc21304d1aeb
Showing with 116 additions and 112 deletions.
  1. +1 −3 .gitignore
  2. +0 −105 CHANGES
  3. +81 −0 Gruntfile.js
  4. +6 −0 README.md
  5. +3 −3 lib/zvm.min.js
  6. +24 −0 package.json
  7. +1 −1 src/ifvms.js
View
@@ -1,6 +1,4 @@
.build
*~
*.pyc
*.z*
src/ifvms.js/test/gameinfo.dbg
src/ifvms.js/test/jquery.js
node_modules
View
105 CHANGES

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,81 @@
module.exports = function( grunt )
{
"use strict";
grunt.initConfig({
concat: {
options: {
process: true,
},
},
jshint: {
options: {
// Enforcing options
curly: true, // Require brackets for all blocks
latedef: true, // require all vars to be defined before being used
newcap: true, // require classes to begin with a capital
strict: true, // ES5 strict mode
undef: true, // all vars must be defined
unused: true, // warn for unused vars
// Relaxing options
"-W041": false, // Use '===' to compare with '0'
"-W064": false, // Don't warn about missing new with ByteArray
"-W065": false, // Missing radix parameter in parseInt
boss: true, // Allow assignments in if, return etc
evil: true, // eval() :)
funcscope: true, // don't complain about using variables defined inside if statements
// Environment
browser: true,
nonstandard: true,
predef: [],
},
parchment: [ '.build/*.js' ],
grunt: {
options: {
node: true,
"-W070": false,
},
files: {
src: [ 'Gruntfile.js' ],
},
},
},
uglify: {
options: {
compress: {
global_defs: {
DEBUG: false,
},
},
preserveComments: function( node, token ) { return (/Built/).test( token.value ); },
report: 'min',
},
zvm: {
options: {
compress: {
global_defs: {
DEBUG: false,
ZVM: true,
GVM: false,
},
},
},
files: {
'lib/zvm.min.js': [ 'src/ifvms.js/dist/zvm.js' ],
}
},
},
});
grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-update-submodules' );
grunt.registerTask( 'default', [ 'update_submodules', 'concat', 'jshint', 'uglify' ] );
};
View
@@ -0,0 +1,6 @@
Parchment
=========
Parchment is the Interactive Fiction player for the web. For more information see [our Google Code site](http://code.google.com/p/parchment). To play a story with it, go to <http://iplayif.com>!
Parchment is BSD licenced, but please help the community by sharing any changes you make with us.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,24 @@
{
"name": "parchment",
"version": "1.0.0",
"description": "The Interactive Fiction player for the web",
"author": {
"name": "The Parchment team",
"url": "https://github.com/curiousdannii/parchment/blob/master/CONTRIBUTORS"
},
"license": "BSD",
"repository": {
"type": "git",
"url": "git://github.com/curiousdannii/parchment.git"
},
"bugs": {
"url": "https://code.google.com/p/parchment/issues/list"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "~0.1.3",
"grunt-contrib-jshint": "~0.3.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-update-submodules": "~0.2.0"
}
}
Submodule ifvms.js updated 3 files
+11 −5 Gruntfile.js
+1 −1 dist/zvm.js
+1 −1 src/zvm/intro.js

0 comments on commit 1281ffc

Please sign in to comment.