Skip to content
Browse files

Add task to Gruntfile to build parser

Summary:
As it is it's not too difficult to just run `node
src/parser-generator.js`, but I thought it would be nice to have both
build tasks in the same file just so it would be easier for anyone else
to figure out how to build the parser.

Also added some quick instructions on how to build it in the README.

Test Plan:
  * Make some change to the parser generator
  * Run `grunt parser`
  * See your changes have been compiled into parser.js

Reviewers: alex

Reviewed By: alex

Differential Revision: http://phabricator.khanacademy.org/D6046
  • Loading branch information...
1 parent e4ce6f8 commit 979db643151c35f8c9790463b88e5eaba7bc8313 @justinj justinj committed Jan 15, 2014
Showing with 17 additions and 2 deletions.
  1. +7 −0 Gruntfile.js
  2. +8 −1 README.md
  3. +2 −1 package.json
View
7 Gruntfile.js
@@ -17,10 +17,17 @@ grunt.initConfig({
src: srcFiles,
dest: "kas.js"
}
+ },
+ execute: {
+ parser: {
+ src: ['src/parser-generator.js']
+ }
}
});
grunt.loadNpmTasks("grunt-contrib-concat");
+grunt.loadNpmTasks('grunt-execute');
grunt.registerTask("default", ["concat"]);
+grunt.registerTask("parser", ["execute:parser"]);
};
View
9 README.md
@@ -6,4 +6,11 @@ A lightweight JavaScript CAS for comparing expressions and equations. It is used
How To Build
------------
npm install
- grunt
+ grunt
+
+To Build Parser
+---------------
+First, make any changes in `src/parser-generator.js`
+
+ npm install
+ grunt parser
View
3 package.json
@@ -29,6 +29,7 @@
"jison": "~0.4.4",
"qunit": "~0.5.16",
"grunt": "~0.4.0",
- "grunt-contrib-concat": "~0.1.3"
+ "grunt-contrib-concat": "~0.1.3",
+ "grunt-execute": "~0.1.5"
}
}

0 comments on commit 979db64

Please sign in to comment.
Something went wrong with that request. Please try again.