Skip to content

Commit 9711613

Browse files
authored
Merge pull request #77 from C-Lodder/changes
Move to Grunt logging
2 parents 33ff818 + 9b14bd9 commit 9711613

File tree

5 files changed

+607
-473
lines changed

5 files changed

+607
-473
lines changed

.jshintrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"esversion": 8,
3+
"asi": true,
34
"curly": true,
45
"eqeqeq": true,
56
"expr": true,

Gruntfile.js

+115-115
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,129 @@
1-
'use strict';
1+
'use strict'
22

33
const processors = [
4-
require('cssnano')
5-
];
4+
require('cssnano')
5+
]
66

77
const processorsFn = () => {
8-
return [
9-
require('cssnano')
10-
];
11-
};
8+
return [
9+
require('cssnano')
10+
]
11+
}
1212

1313
module.exports = (grunt) => {
14-
require('load-grunt-tasks')(grunt);
15-
require('@lodder/time-grunt')(grunt);
14+
require('load-grunt-tasks')(grunt)
15+
require('@lodder/time-grunt')(grunt)
1616

17-
grunt.initConfig({
18-
jshint: {
19-
all: [
20-
'Gruntfile.js',
21-
'tasks/*.js',
22-
'<%= nodeunit.tests %>',
23-
],
24-
options: {
25-
jshintrc: '.jshintrc',
26-
},
27-
},
17+
grunt.initConfig({
18+
jshint: {
19+
all: [
20+
'Gruntfile.js',
21+
'tasks/*.js',
22+
'<%= nodeunit.tests %>',
23+
],
24+
options: {
25+
jshintrc: '.jshintrc',
26+
},
27+
},
2828

29-
clean: {
30-
tests: ['tmp'],
31-
},
29+
clean: {
30+
tests: ['tmp'],
31+
},
3232

33-
postcss: {
34-
defaults: {
35-
options: {
36-
processors
37-
},
38-
src: 'test/fixtures/a.css',
39-
dest: 'tmp/defaults.css'
40-
},
41-
defaultsFn: {
42-
options: {
43-
processors: processorsFn
44-
},
45-
src: 'test/fixtures/a.css',
46-
dest: 'tmp/defaultsFn.css'
47-
},
48-
mapInline: {
49-
options: {
50-
map: true,
51-
processors
52-
},
53-
src: 'test/fixtures/a.css',
54-
dest: 'tmp/mapInline.css'
55-
},
56-
mapSeparate: {
57-
options: {
58-
map: {
59-
inline: false
60-
},
61-
processors
62-
},
63-
src: 'test/fixtures/a.css',
64-
dest: 'tmp/mapSeparate.css'
65-
},
66-
mapAnnotationPath: {
67-
options: {
68-
map: {
69-
inline: false,
70-
annotation: 'tmp/maps/'
71-
},
72-
processors
73-
},
74-
src: 'test/fixtures/a.css',
75-
dest: 'tmp/mapAnnotationPath.css'
76-
},
77-
diff: {
78-
options: {
79-
diff: true,
80-
processors
81-
},
82-
src: 'test/fixtures/a.css',
83-
dest: 'tmp/diff.css'
84-
},
85-
syntax: {
86-
options: {
87-
syntax: require('postcss-scss'),
88-
processors: []
89-
},
90-
src: 'test/fixtures/a.scss',
91-
dest: 'tmp/syntax.scss'
92-
},
93-
doWriteDest: {
94-
options: {
95-
syntax: require('postcss-scss'),
96-
writeDest: true
97-
},
98-
src: 'test/fixtures/a.scss',
99-
dest: 'tmp/doWriteDest.scss'
100-
},
101-
noWriteDest: {
102-
options: {
103-
syntax: require('postcss-scss'),
104-
writeDest: false
105-
},
106-
src: 'test/fixtures/a.scss',
107-
dest: 'tmp/noWriteDest.scss'
108-
},
109-
sequential: {
110-
options: {
111-
syntax: require('postcss-scss'),
112-
sequential: true
113-
},
114-
src: ['test/fixtures/a.scss', 'test/fixtures/a.css'],
115-
dest: 'tmp/sequential.css'
116-
}
33+
postcss: {
34+
defaults: {
35+
options: {
36+
processors,
11737
},
118-
119-
nodeunit: {
120-
tests: ['test/test.js'],
38+
src: 'test/fixtures/a.css',
39+
dest: 'tmp/defaults.css',
40+
},
41+
defaultsFn: {
42+
options: {
43+
processors: processorsFn,
44+
},
45+
src: 'test/fixtures/a.css',
46+
dest: 'tmp/defaultsFn.css',
47+
},
48+
mapInline: {
49+
options: {
50+
map: true,
51+
processors,
52+
},
53+
src: 'test/fixtures/a.css',
54+
dest: 'tmp/mapInline.css',
55+
},
56+
mapSeparate: {
57+
options: {
58+
map: {
59+
inline: false,
60+
},
61+
processors,
12162
},
63+
src: 'test/fixtures/a.css',
64+
dest: 'tmp/mapSeparate.css',
65+
},
66+
mapAnnotationPath: {
67+
options: {
68+
map: {
69+
inline: false,
70+
annotation: 'tmp/maps/',
71+
},
72+
processors,
73+
},
74+
src: 'test/fixtures/a.css',
75+
dest: 'tmp/mapAnnotationPath.css',
76+
},
77+
diff: {
78+
options: {
79+
diff: true,
80+
processors,
81+
},
82+
src: 'test/fixtures/a.css',
83+
dest: 'tmp/diff.css',
84+
},
85+
syntax: {
86+
options: {
87+
syntax: require('postcss-scss'),
88+
processors: [],
89+
},
90+
src: 'test/fixtures/a.scss',
91+
dest: 'tmp/syntax.scss',
92+
},
93+
doWriteDest: {
94+
options: {
95+
syntax: require('postcss-scss'),
96+
writeDest: true,
97+
},
98+
src: 'test/fixtures/a.scss',
99+
dest: 'tmp/doWriteDest.scss',
100+
},
101+
noWriteDest: {
102+
options: {
103+
syntax: require('postcss-scss'),
104+
writeDest: false,
105+
},
106+
src: 'test/fixtures/a.scss',
107+
dest: 'tmp/noWriteDest.scss',
108+
},
109+
sequential: {
110+
options: {
111+
syntax: require('postcss-scss'),
112+
sequential: true,
113+
},
114+
src: ['test/fixtures/a.scss', 'test/fixtures/a.css'],
115+
dest: 'tmp/sequential.css',
116+
}
117+
},
118+
119+
nodeunit: {
120+
tests: ['test/test.js'],
121+
},
122122

123-
});
123+
})
124124

125-
grunt.loadTasks('tasks');
125+
grunt.loadTasks('tasks')
126126

127-
grunt.registerTask('test', ['clean', 'postcss', 'nodeunit']);
128-
grunt.registerTask('default', ['jshint', 'test']);
129-
};
127+
grunt.registerTask('test', ['clean', 'postcss', 'nodeunit'])
128+
grunt.registerTask('default', ['jshint', 'test'])
129+
}

package-lock.json

+131-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)