@@ -8,17 +8,85 @@ module.exports = function(grunt) {
8
8
banner : '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
9
9
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
10
10
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
11
- '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>; ' +
12
- ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n' ,
11
+ '* Copyright (c) <%= grunt.template.today("yyyy") %> Nicole Sullivan and Nicholas C. Zakas;\n ' +
12
+ '* Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> <%= _.pluck(pkg.licenses, "url ").join(", ") %> */\n' ,
13
13
// Task configuration.
14
14
concat : {
15
- options : {
16
- banner : '<%= banner %>' ,
17
- stripBanners : true
15
+ core : {
16
+ options : {
17
+ banner : '<%= banner %>\nvar CSSLint = (function(){' ,
18
+ footer : '\nreturn CSSLint;\n})();'
19
+ } ,
20
+ src : [
21
+ 'src/core/CSSLint.js' ,
22
+ 'src/core/*.js' ,
23
+ 'src/rules/*.js' ,
24
+ 'src/formatters/*.js'
25
+ ] ,
26
+ dest : 'build/<%= pkg.name %>.js'
27
+ } , //Build environment workers
28
+ rhino : {
29
+ src : [
30
+ '<%= concat.core.dest %>' ,
31
+ 'src/cli/{common, rhino}.js'
32
+ ] ,
33
+ dest : 'build/<%= pkg.name %>-rhino.js'
18
34
} ,
19
- dist : {
20
- src : [ 'lib/<%= pkg.name %>.js' ] ,
21
- dest : 'dist/<%= pkg.name %>.js'
35
+ node : {
36
+ options : {
37
+ banner : '<%= banner %>' ,
38
+ footer : '\nexports.CSSLint = CSSLint;'
39
+ } ,
40
+ src : [
41
+ 'src/core/CSSLint.js' ,
42
+ 'src/core/*.js' ,
43
+ 'src/rules/*.js' ,
44
+ 'src/formatters/*.js'
45
+ ] ,
46
+ dest : 'build/<%= pkg.name %>-node.js'
47
+ } ,
48
+ node_cli : {
49
+ options : {
50
+ banner : '#!/usr/bin/env node\n<%= banner %>'
51
+ } ,
52
+ src : [
53
+ 'src/cli/{common, node}.js'
54
+ ] ,
55
+ dest : 'build/npm/cli.js'
56
+ } ,
57
+ worker : {
58
+ options : {
59
+ banner : '<%= banner %>'
60
+ } ,
61
+ src : [
62
+ 'src/core/CSSLint.js' ,
63
+ 'src/core/*.js' ,
64
+ 'src/rules/*.js' ,
65
+ 'src/formatters/*.js' ,
66
+ 'src/worker/*.js'
67
+ ] ,
68
+ dest : 'build/<%= pkg.name %>-worker.js'
69
+ } ,
70
+ whs : {
71
+ src : [
72
+ '<%= concat.core.dest %>' ,
73
+ 'src/cli/{common, whs}.js'
74
+ ] ,
75
+ dest : 'build/<%= pkg.name %>-whs.js'
76
+ } , //Build tests
77
+ tests : {
78
+ src : [
79
+ '!tests/all-rules.js' ,
80
+ 'tests/**/*.js'
81
+ ] ,
82
+ dest : 'build/npm/cli.js'
83
+ } ,
84
+ tests_node : {
85
+ src : [
86
+ '<%= concat.core.dest %>' ,
87
+ 'tests/**/*.js'
88
+ ] ,
89
+ dest : 'build/npm/cli.js'
22
90
}
23
91
} ,
24
92
uglify : {
@@ -61,7 +129,7 @@ module.exports = function(grunt) {
61
129
src : [ 'src/**/*.js' ]
62
130
} ,
63
131
tests : {
64
- src : [ 'lib/**/*.js' , ' test/**/*.js']
132
+ src : [ 'test/**/*.js' ]
65
133
}
66
134
} ,
67
135
watch : {
0 commit comments