Skip to content

Commit e7d5d5f

Browse files
committed
Fix concat targets
- Order for exclusions in the test globbing is important - Use require for node version of parser-lib/CSSLint - Revert to Core version of CSSLint for non-Node versions - The curly brace pattern matching wasn't working so switched it to individuals for the CLI includes
1 parent 1c40592 commit e7d5d5f

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

Gruntfile.js

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,38 +47,38 @@ module.exports = function(grunt) {
4747
dest: 'build/<%= pkg.name %>.js'
4848
},//Build environment workers
4949
rhino: {
50-
options: {
51-
banner: 'var exports = exports || {};\n' //Hack for using the node version of parserlib
52-
},
5350
src: [
5451
'<%= concat.core.dest %>',
55-
'src/cli/{common, rhino}.js'
52+
'src/cli/common.js',
53+
'src/cli/rhino.js'
5654
],
5755
dest: 'build/<%= pkg.name %>-rhino.js'
5856
},
5957
node: {
6058
options: {
61-
banner: '<%= banner %>',
59+
banner: '<%= banner %>\n' +
60+
'var parserlib = require("parserlib");\n',
6261
footer: '\nexports.CSSLint = CSSLint;'
6362
},
6463
files: {
65-
'build/<%= pkg.name %>-node.js': ['<%= core_files %>'],
66-
'build/npm/lib/<%= pkg.name %>-node.js': ['<%= core_files %>']
64+
'build/<%= pkg.name %>-node.js': ['<%= csslint_files %>'],
65+
'build/npm/lib/<%= pkg.name %>-node.js': ['<%= csslint_files %>']
6766
}
6867
},
6968
node_cli: {
7069
options: {
7170
banner: '#!/usr/bin/env node\n<%= banner %>'
7271
},
7372
src: [
74-
'src/cli/{common, node}.js'
73+
'src/cli/common.js',
74+
'src/cli/node.js'
7575
],
7676
dest: 'build/npm/cli.js'
7777
},
7878
tests: {
7979
src: [
80-
'!tests/all-rules.js',
81-
'tests/**/*.js'
80+
'tests/**/*.js',
81+
'!tests/all-rules.js'
8282
],
8383
dest: 'build/<%= pkg.name %>-tests.js'
8484
},
@@ -95,14 +95,10 @@ module.exports = function(grunt) {
9595
dest: 'build/<%= pkg.name %>-worker.js'
9696
},
9797
wsh: {
98-
options: {
99-
banner: '<%= banner %>\n' +
100-
//Hack for using the node version of parserlib
101-
'var exports = exports || {};\n'
102-
},
10398
src: [
104-
'<%= core_files %>',
105-
'src/cli/{common, wsh}.js'
99+
'<%= concat.core.dest %>',
100+
'src/cli/common.js',
101+
'src/cli/wsh.js'
106102
],
107103
dest: 'build/<%= pkg.name %>-wsh.js'
108104
}
@@ -201,7 +197,7 @@ module.exports = function(grunt) {
201197

202198
grunt.registerTask('test', ['clean:build', 'jshint', 'concat', 'yuitest']);
203199

204-
grunt.registerTask('release', ['test', 'clean:release', 'copy:release', 'includereplace', 'changelog']);
200+
grunt.registerTask('release', ['test', 'clean:release', 'copy:release', 'includereplace:release', 'changelog']);
205201

206202
//Run the YUITest suite
207203
grunt.registerMultiTask('yuitest', 'Run the YUITests for the project', function() {

0 commit comments

Comments
 (0)