@@ -31,6 +31,7 @@ module.exports = function(grunt) {
3131 options : {
3232 compact : true ,
3333 comments : false ,
34+ sourceMaps : false ,
3435 presets : [ 'es2015' ] ,
3536 plugins : [ 'add-module-exports' ]
3637 } ,
@@ -46,9 +47,6 @@ module.exports = function(grunt) {
4647 } ]
4748 } ,
4849 demo : {
49- options : {
50- sourceMaps : false
51- } ,
5250 files : [ {
5351 src : [ '*.js' ] ,
5452 expand : true ,
@@ -362,68 +360,82 @@ module.exports = function(grunt) {
362360 grunt . registerTask ( 'default' , [
363361 'dist'
364362 ] ) ;
363+ // Create new build in .tmp/ folder
365364 grunt . registerTask ( 'build' , [
366365 'clean:build' ,
367366 'shell:build' ,
368367 'babel:build'
369368 ] ) ;
370-
369+ // Create new lib folder
371370 grunt . registerTask ( 'dist' , [
372371 'demobuild' ,
373372 'clean:release' ,
374373 'copy:release' ,
375374 'usebanner:release'
376375 ] ) ;
376+ // Create new version of command line utility at bin/sqlite-parser
377377 grunt . registerTask ( 'bin' , [
378378 'clean:bin' ,
379379 'babel:bin' ,
380380 'replace:bin' ,
381381 'usebanner:bin'
382382 ] ) ;
383-
383+ // Build parser to .tmp/ and run tests
384384 grunt . registerTask ( 'test' , [
385385 'build' , 'shell:test'
386386 ] ) ;
387+ // Build parser to .tmp/ and run extended test suite
387388 grunt . registerTask ( 'testall' , [
388389 'build' , 'shell:testAll'
389390 ] ) ;
391+ // Re-process every .test file in test/raw/ to .sql files in
392+ // test/sql/official-suite
390393 grunt . registerTask ( 'testprocess' , [
391394 'clean:testProcess' , 'shell:testProcess'
392395 ] ) ;
393-
396+ // Watch the parser and then build to .tmp/ and run tests on changes
394397 grunt . registerTask ( 'testwatch' , [
395398 'test' , 'watch:test'
396399 ] ) ;
400+ // Is testwatch but also logs the generated ASTs as formatted JSON
401+ // objects in the test output
397402 grunt . registerTask ( 'debug' , [
398403 'build' , 'shell:debug' , 'watch:debug'
399404 ] ) ;
405+ // Build the parser to .tmp/ and run tests, but take the output from the
406+ // parser use it to overwrite the existing test JSON files in test/json/
400407 grunt . registerTask ( 'rewrite-json' , [
401408 'build' , 'shell:rewrite'
402409 ] ) ;
403-
410+ // Rebuild the interactive demo site to .tmp/
404411 grunt . registerTask ( 'interactive' , [
405412 'build' ,
406413 'concurrent:interactive'
407414 ] ) ;
415+ // Watch the parser and demo files and then build parser and interactive
416+ // demo to .tmp/ on changes
408417 grunt . registerTask ( 'live' , [
409418 'concurrent:live' ,
410419 'connect:server' ,
411420 'watch:interactive'
412421 ] ) ;
413-
422+ // Build the interactive demo as a index.html and one minified CSS and
423+ // one minified JS bundle to the demo/ folder
414424 grunt . registerTask ( 'demo' , [
415425 'clean:demo' ,
416426 'concurrent:demo1' ,
417427 'concurrent:demo2' ,
418428 'usebanner:demo'
419429 ] ) ;
430+ // Build the parser to .tmp/ but do not include the inline sourcemaps
420431 grunt . registerTask ( 'demobuild' , [
421432 'clean:build' ,
422433 'shell:build' ,
423434 'babel:demo'
424435 ] ) ;
425-
426-
436+ // Create new command line parser at bin/sqlite-parser, create release
437+ // version of the parser in lib/ and then create a new copy of the
438+ // release version of the interactive demo in demo/
427439 grunt . registerTask ( 'release' , [
428440 'concurrent:release'
429441 ] ) ;
0 commit comments