Skip to content

Commit 9fae39c

Browse files
committed
Update build and dependencies.
1 parent f02de24 commit 9fae39c

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

Gruntfile.js

+18-9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ module.exports = function(grunt) {
22

33
grunt.initConfig({
44

5+
watch: {
6+
scripts: {
7+
files: [ 'src/**.js', 'test/*.js' ],
8+
tasks: [ 'test' ],
9+
options: {
10+
spawn: false,
11+
},
12+
},
13+
},
14+
515
concat: {
616
dist: {
717
src: [
@@ -26,17 +36,19 @@ module.exports = function(grunt) {
2636
}
2737
},
2838

29-
lint: {
30-
all: ['grunt.js', 'dist/ecore.js', 'test/*.js']
31-
},
32-
3339
jshint: {
40+
beforeconcat: [ 'src/*.js' ],
41+
afterconcat: [ 'dist/ecore.js', 'dist/ecore.xmi.js' ],
3442
options: {
43+
curly: true,
44+
eqeqeq: true,
45+
eqnull: true,
3546
browser: true
3647
}
3748
},
3849

39-
mochaTestConfig: {
50+
mochaTest: {
51+
files: ['test/*.test.js'],
4052
options: {
4153
globals: ['should'],
4254
timeout: 3000,
@@ -46,10 +58,6 @@ module.exports = function(grunt) {
4658
}
4759
},
4860

49-
mochaTest: {
50-
files: ['test/*.test.js']
51-
},
52-
5361
uglify: {
5462
dist: {
5563
files: {
@@ -69,6 +77,7 @@ module.exports = function(grunt) {
6977
grunt.loadNpmTasks('grunt-contrib-watch');
7078
grunt.loadNpmTasks('grunt-contrib-concat');
7179
grunt.loadNpmTasks('grunt-mocha-test');
80+
grunt.loadNpmTasks('grunt-contrib-jshint');
7281

7382
grunt.registerTask('test', ['concat', 'mochaTest']);
7483
grunt.registerTask('build', ['concat', 'mochaTest', 'uglify']);

build/head.js

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
(function() {
88

9+
"use strict";
10+
911
// The root object, `window` in the browser, or `global` on the server.
1012
var root = this;
1113

build/tail.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
})();
1+
}.call(this));
22

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222
},
2323
"devDependencies": {
2424
"grunt": "~0.4.5",
25-
"mocha": "^1.20.1",
26-
"grunt-contrib-concat": "^0.1.3",
27-
"grunt-contrib-uglify": "^0.2.7",
28-
"grunt-contrib-watch": "^0.3.1",
29-
"grunt-mocha-test": "^0.2.2"
25+
"grunt-contrib-concat": "^0.4.0",
26+
"grunt-contrib-jshint": "^0.10.0",
27+
"grunt-contrib-uglify": "^0.4.0",
28+
"grunt-contrib-watch": "^0.4.0",
29+
"grunt-mocha-test": "^0.12.4",
30+
"mocha": "^2.0.1"
3031
},
3132
"directories": {
3233
"doc": "docs",

0 commit comments

Comments
 (0)