Commit e6c0760b authored by Tristan Cavelier's avatar Tristan Cavelier

make grunt updated

parent f0045483
/*jslint indent: 2, maxlen: 80 */
/*global module */
module.exports = function (grunt) { module.exports = function (grunt) {
"use strict"; "use strict";
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
pkg: grunt.file.readJSON('package.json'), pkg: grunt.file.readJSON('package.json'),
uglify: { jslint: {
grunt: {
src: ['Gruntfile.js'],
options: { options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n', errorsOnly: true
},
jio: {
src: 'jio.js', // '<%= pkg.name %>.js'
dest: 'jio.min.js',
} }
}, },
jslint: {
jio: { jio: {
src: ['src/jio/**/*.js'], src: ['src/jio/**/*.js'],
exclude: ['src/jio/intro.js', 'src/jio/outro.js'], exclude: ['src/jio/intro.js', 'src/jio/outro.js'],
options: { options: {
errorsOnly: true, errorsOnly: true
}
},
jio_storages: {
src: ['src/jio.storage/**/*.js'],
options: {
errorsOnly: true
} }
}, },
tests: { tests: {
src: ['test/**/*.js'], src: ['test/**/*.js'],
options: { options: {
errorsOnly: true, errorsOnly: true
}
},
queries: {
src: ['src/queries/core/**/*.js'],
exclude: [
'src/queries/begin.js',
'src/queries/end.js',
'src/queries/parser-begin.js',
'src/queries/parser-end.js'
],
options: {
errorsOnly: true
} }
} }
// queries: {
// src: ['src/queries/**/*.js'],
// exclude: ['src/queries/begin.js', 'src/queries/end.js']
// }
}, },
concat: { concat: {
jio: { jio: {
//banner: 'src/jio/intro.js',
//footer: 'src/j',
src: [ src: [
'src/jio/intro.js', 'src/jio/intro.js',
'src/jio/core/**/*.js', 'src/jio/core/**/*.js',
'src/jio/features/**/*.js', 'src/jio/features/**/*.js',
'src/jio/outro.js', 'src/jio/outro.js'
], ],
dest: 'jio.js', dest: 'jio.js'
},
queries: {
src: [
'src/queries/begin.js',
'src/queries/parser-begin.js',
'src/queries/build/parser.js',
'src/queries/parser-end.js',
'src/queries/core/**/*.js',
'src/queries/end.js'
],
dest: 'complex_queries.js'
} }
}, },
qunit: { uglify: {
files: ['test/tests.html'], // grunt doesn't like requirejs options: {
banner: '/*! <%= pkg.name %> <%= pkg.version %> ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */\n'
}, },
jio: {
src: 'jio.js', // '<%= pkg.name %>.js'
dest: 'jio.min.js'
},
queries: {
src: 'complex_queries.js',
dest: 'complex_queries.min.js'
}
},
qunit: {
// grunt doesn't like requirejs
// phantomjs daesn't know Blobs !!
files: ['test/tests.html']
}
}); });
grunt.loadNpmTasks('grunt-jslint'); grunt.loadNpmTasks('grunt-jslint');
......
...@@ -6,14 +6,15 @@ JIO = jio.js ...@@ -6,14 +6,15 @@ JIO = jio.js
JIO_MIN = jio.min.js JIO_MIN = jio.min.js
COMPLEX = complex_queries.js COMPLEX = complex_queries.js
COMPLEX_MIN = complex_queries.min.js COMPLEX_MIN = complex_queries.min.js
PARSER_PAR = $(QUERIES_DIR)/parser.par PARSER_PAR = $(QUERIES_DIR)/core/parser.par
PARSER_OUT = $(QUERIES_DIR)/parser.js PARSER_OUT = $(QUERIES_DIR)/build/parser.js
JSCC_CMD = node ./node_modules/jscc-node/jscc.js -t ./node_modules/jscc-node/driver_node.js_ JSCC_CMD = node ./node_modules/jscc-node/jscc.js -t ./node_modules/jscc-node/driver_node.js_
auto: compile auto: compile
compile: compile:
mkdir -p $(dir $(PARSER_OUT))
$(JSCC_CMD) -o $(PARSER_OUT) $(PARSER_PAR) $(JSCC_CMD) -o $(PARSER_OUT) $(PARSER_PAR)
.phony: clean .phony: clean
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment