Skip to content

Commit 53e017c

Browse files
committed
Alias build directory
1 parent e4faab8 commit 53e017c

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

Gruntfile.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = function(grunt) {
1010
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
1111
'* Copyright (c) <%= grunt.template.today("yyyy") %> Nicole Sullivan and Nicholas C. Zakas;\n' +
1212
'* Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> <%= _.pluck(pkg.licenses, "url").join(", ") %> */\n',
13+
build_dir: 'build',
1314
//Parser lib copy for verions that can't user requirejs
1415
parserlib: 'node_modules/parserlib/lib/node-parserlib.js',
1516
//Core CSSLint files used by most versions
@@ -26,7 +27,7 @@ module.exports = function(grunt) {
2627
],
2728
// Task configuration.
2829
clean: {
29-
build: ['build'],
30+
build: ['<%= build_dir %>'],
3031
release: ['release']
3132
},
3233
changelog: {
@@ -44,15 +45,15 @@ module.exports = function(grunt) {
4445
src: [
4546
'<%= core_files %>'
4647
],
47-
dest: 'build/<%= pkg.name %>.js'
48+
dest: '<%= build_dir %>/<%= pkg.name %>.js'
4849
},//Build environment workers
4950
rhino: {
5051
src: [
5152
'<%= concat.core.dest %>',
5253
'src/cli/common.js',
5354
'src/cli/rhino.js'
5455
],
55-
dest: 'build/<%= pkg.name %>-rhino.js'
56+
dest: '<%= build_dir %>/<%= pkg.name %>-rhino.js'
5657
},
5758
node: {
5859
options: {
@@ -61,8 +62,8 @@ module.exports = function(grunt) {
6162
footer: '\nexports.CSSLint = CSSLint;'
6263
},
6364
files: {
64-
'build/<%= pkg.name %>-node.js': ['<%= csslint_files %>'],
65-
'build/npm/lib/<%= pkg.name %>-node.js': ['<%= csslint_files %>']
65+
'<%= build_dir %>/<%= pkg.name %>-node.js': ['<%= csslint_files %>'],
66+
'<%= build_dir %>/npm/lib/<%= pkg.name %>-node.js': ['<%= csslint_files %>']
6667
}
6768
},
6869
node_cli: {
@@ -73,14 +74,14 @@ module.exports = function(grunt) {
7374
'src/cli/common.js',
7475
'src/cli/node.js'
7576
],
76-
dest: 'build/npm/cli.js'
77+
dest: '<%= build_dir %>/npm/cli.js'
7778
},
7879
tests: {
7980
src: [
8081
'tests/**/*.js',
8182
'!tests/all-rules.js'
8283
],
83-
dest: 'build/<%= pkg.name %>-tests.js'
84+
dest: '<%= build_dir %>/<%= pkg.name %>-tests.js'
8485
},
8586
worker: {
8687
options: {
@@ -92,21 +93,21 @@ module.exports = function(grunt) {
9293
'<%= core_files %>',
9394
'src/worker/*.js'
9495
],
95-
dest: 'build/<%= pkg.name %>-worker.js'
96+
dest: '<%= build_dir %>/<%= pkg.name %>-worker.js'
9697
},
9798
wsh: {
9899
src: [
99100
'<%= concat.core.dest %>',
100101
'src/cli/common.js',
101102
'src/cli/wsh.js'
102103
],
103-
dest: 'build/<%= pkg.name %>-wsh.js'
104+
dest: '<%= build_dir %>/<%= pkg.name %>-wsh.js'
104105
}
105106
},
106107
copy: {
107108
release: {
108109
files: {
109-
'build': 'release',
110+
'<%= build_dir %>': 'release',
110111
'release/npm/package.json': 'package.json'
111112
}
112113
}
@@ -122,7 +123,7 @@ module.exports = function(grunt) {
122123
suffix: '@'
123124
},
124125
// Files to perform replacements and includes with
125-
src: 'build/**/*.*',
126+
src: '<%= build_dir %>/**/*.*',
126127
// Destinaion directory to copy files to
127128
dest: 'release/'
128129
}

0 commit comments

Comments
 (0)