Run jshint on output
Allows us to execute jshint in non-forced mode.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
"console",
|
||||
"Ember",
|
||||
"DS",
|
||||
"Handlebars",
|
||||
"Metamorph",
|
||||
"ember_assert",
|
||||
"ember_warn",
|
||||
@@ -22,6 +21,7 @@
|
||||
"ok",
|
||||
"strictEqual",
|
||||
"module",
|
||||
"define",
|
||||
|
||||
"describe",
|
||||
"it",
|
||||
|
||||
+5
-6
@@ -7,11 +7,10 @@ module.exports = function(grunt) {
|
||||
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: '.jshintrc',
|
||||
force: true
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
files: [
|
||||
'lib/**/!(parser).js'
|
||||
'dist/**/!(*.min|parser).js'
|
||||
]
|
||||
},
|
||||
|
||||
@@ -116,17 +115,17 @@ module.exports = function(grunt) {
|
||||
|
||||
// Build a new version of the library
|
||||
this.registerTask('build', "Builds a distributable version of the current project", [
|
||||
'jshint',
|
||||
'clean',
|
||||
'parser',
|
||||
'node',
|
||||
'globals']);
|
||||
'globals',
|
||||
'jshint']);
|
||||
|
||||
this.registerTask('amd', ['packager:amd', 'requirejs']);
|
||||
this.registerTask('node', ['packager:cjs']);
|
||||
this.registerTask('globals', ['packager:global']);
|
||||
|
||||
this.registerTask('release', 'Build final packages', ['amd', 'uglify', 'copy:dist', 'copy:components', 'copy:cdnjs']);
|
||||
this.registerTask('release', 'Build final packages', ['amd', 'jshint', 'uglify', 'copy:dist', 'copy:components', 'copy:cdnjs']);
|
||||
|
||||
// Load tasks from npm
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/*globals Handlebars: true */
|
||||
module base from "./handlebars/base";
|
||||
|
||||
// Each of these augment the Handlebars object. No need to setup here.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/*globals Exception, Utils */
|
||||
module Utils from "./utils";
|
||||
import Exception from "./exception";
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/*global Utils */
|
||||
module Utils from "./utils";
|
||||
import Exception from "./exception";
|
||||
import { COMPILER_REVISION, REVISION_CHANGES } from "./base";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/*jshint -W004 */
|
||||
import SafeString from "./safe-string";
|
||||
|
||||
var escape = {
|
||||
|
||||
+3
-3
@@ -33,9 +33,10 @@
|
||||
"dustjs-linkedin": "~2.0.2",
|
||||
"eco": "~1.1.0-rc-3",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-cli": "~0.1.10",
|
||||
"grunt-contrib-clean": "~0.4.1",
|
||||
"grunt-contrib-copy": "~0.4.1",
|
||||
"grunt-contrib-jshint": "~0.6.3",
|
||||
"grunt-contrib-jshint": "~0.7.2",
|
||||
"grunt-contrib-requirejs": "~0.4.1",
|
||||
"grunt-contrib-uglify": "~0.2.2",
|
||||
"es6-module-packager": "~0.1.1",
|
||||
@@ -45,8 +46,7 @@
|
||||
"mustache": "~0.7.2",
|
||||
"semver": "~2.1.0",
|
||||
"should": "~1.2.2",
|
||||
"underscore": "~1.5.1",
|
||||
"grunt-cli": "~0.1.10"
|
||||
"underscore": "~1.5.1"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"bin": {
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD}
|
||||
<mu>".." return 'ID';
|
||||
<mu>"."/{LOOKAHEAD} return 'ID';
|
||||
<mu>[\/.] return 'SEP';
|
||||
<mu>\s+ /*ignore whitespace*/
|
||||
<mu>\s+ // ignore whitespace
|
||||
<mu>"}"{RIGHT_STRIP}?"}}" this.popState(); return 'CLOSE_UNESCAPED';
|
||||
<mu>{RIGHT_STRIP}?"}}" this.popState(); return 'CLOSE';
|
||||
<mu>'"'("\\"["]|[^"])*'"' yytext = strip(1,2).replace(/\\"/g,'"'); return 'STRING';
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/* jshint ignore:start */
|
||||
@@ -1 +1,2 @@
|
||||
export default handlebars;
|
||||
/* jshint ignore:end */
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ module.exports = function(grunt) {
|
||||
return;
|
||||
}
|
||||
|
||||
var src = ['handlebars.js', 'src/parser-suffix.js'].map(grunt.file.read).join('');
|
||||
var src = ['src/parser-prefix.js', 'handlebars.js', 'src/parser-suffix.js'].map(grunt.file.read).join('');
|
||||
grunt.file.delete('handlebars.js');
|
||||
|
||||
grunt.file.write('lib/handlebars/compiler/parser.js', src);
|
||||
|
||||
Reference in New Issue
Block a user