Skip to content

Commit 468aec3

Browse files
committed
Require Node.js 8 and Grunt 1
1 parent a672f19 commit 468aec3

File tree

12 files changed

+201
-196
lines changed

12 files changed

+201
-196
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ charset = utf-8
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99

10-
[{package.json,*.yml}]
10+
[*.yml]
1111
indent_style = space
1212
indent_size = 2

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* text=auto
1+
* text=auto eol=lf

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2+
yarn.lock
23
test/tmp

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
sudo: false
21
language: node_js
32
node_js:
4-
- '5'
5-
- '4'
6-
- '0.12'
7-
- '0.10'
3+
- '12'
4+
- '10'
5+
- '8'

gruntfile.js

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
11
'use strict';
2-
var supportsColor = require('supports-color');
2+
const supportsColor = require('supports-color');
33

4-
module.exports = function (grunt) {
4+
module.exports = grunt => {
55
grunt.initConfig({
66
concurrent: {
7-
test: ['test1', 'test2', 'test3'],
8-
testSequence: ['test4', ['test5', 'test6']],
9-
testargs: ['testargs1', 'testargs2'],
7+
test: [
8+
'test1',
9+
'test2',
10+
'test3'
11+
],
12+
testSequence: [
13+
'test4', [
14+
'test5',
15+
'test6'
16+
]
17+
],
18+
testargs: [
19+
'testargs1',
20+
'testargs2'
21+
],
1022
log: {
1123
options: {
1224
logConcurrentOutput: true
1325
},
14-
tasks: ['nodemon', 'watch']
26+
tasks: [
27+
'nodemon',
28+
'watch'
29+
]
1530
},
16-
colors: ['colorcheck']
31+
colors: [
32+
'colorcheck'
33+
]
1734
},
1835
simplemocha: {
1936
test: {
@@ -24,12 +41,18 @@ module.exports = function (grunt) {
2441
}
2542
},
2643
clean: {
27-
test: ['test/tmp']
44+
test: [
45+
'test/tmp'
46+
]
2847
},
2948
watch: {
3049
scripts: {
31-
files: ['tasks/*.js'],
32-
tasks: ['default']
50+
files: [
51+
'tasks/*.js'
52+
],
53+
tasks: [
54+
'default'
55+
]
3356
}
3457
},
3558
nodemon: {
@@ -47,54 +70,54 @@ module.exports = function (grunt) {
4770
grunt.loadNpmTasks('grunt-simple-mocha');
4871
grunt.loadNpmTasks('grunt-nodemon');
4972

50-
grunt.registerTask('test1', function () {
73+
grunt.registerTask('test1', () => {
5174
console.log('test1');
5275
grunt.file.write('test/tmp/1');
5376
});
5477

5578
grunt.registerTask('test2', function () {
56-
var cb = this.async();
57-
setTimeout(function () {
79+
const cb = this.async();
80+
setTimeout(() => {
5881
console.log('test2');
5982
grunt.file.write('test/tmp/2');
6083
cb();
6184
}, 1000);
6285
});
6386

64-
grunt.registerTask('test3', function () {
87+
grunt.registerTask('test3', () => {
6588
console.log('test3');
6689
grunt.file.write('test/tmp/3');
6790
});
6891

69-
grunt.registerTask('test4', function () {
92+
grunt.registerTask('test4', () => {
7093
console.log('test4');
7194
grunt.file.write('test/tmp/4');
7295
});
7396

74-
grunt.registerTask('test5', function () {
97+
grunt.registerTask('test5', () => {
7598
console.log('test5');
7699
grunt.file.write('test/tmp/5');
77100
sleep(1000);
78101
});
79102

80-
grunt.registerTask('test6', function () {
103+
grunt.registerTask('test6', () => {
81104
console.log('test6');
82105
grunt.file.write('test/tmp/6');
83106
});
84107

85-
grunt.registerTask('testargs1', function () {
86-
var args = grunt.option.flags().join();
108+
grunt.registerTask('testargs1', () => {
109+
const args = grunt.option.flags().join();
87110
grunt.file.write('test/tmp/args1', args);
88111
});
89112

90-
grunt.registerTask('testargs2', function () {
91-
var args = grunt.option.flags().join();
113+
grunt.registerTask('testargs2', () => {
114+
const args = grunt.option.flags().join();
92115
grunt.file.write('test/tmp/args2', args);
93116
});
94117

95-
grunt.registerTask('colorcheck', function () {
96-
// writes 'true' or 'false' to the file
97-
var supports = String(Boolean(supportsColor));
118+
grunt.registerTask('colorcheck', () => {
119+
// Writes 'true' or 'false' to the file
120+
const supports = String(Boolean(supportsColor.stdout));
98121
grunt.file.write('test/tmp/colors', supports);
99122
});
100123

@@ -108,8 +131,8 @@ module.exports = function (grunt) {
108131
};
109132

110133
function sleep(milliseconds) {
111-
var start = new Date().getTime();
112-
for (var i = 0; i < 1e7; i++) {
134+
const start = new Date().getTime();
135+
for (let i = 0; i < 1e7; i++) {
113136
if ((new Date().getTime() - start) > milliseconds) {
114137
break;
115138
}

license

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1-
The MIT License (MIT)
1+
MIT License
22

33
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
116

12-
The above copyright notice and this permission notice shall be included in
13-
all copies or substantial portions of the Software.
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
148

15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

package.json

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
{
2-
"name": "grunt-concurrent",
3-
"version": "2.3.1",
4-
"description": "Run grunt tasks concurrently",
5-
"keywords": [
6-
"gruntplugin",
7-
"concurrent",
8-
"parallel",
9-
"simultaneous",
10-
"optimize",
11-
"speed",
12-
"perf",
13-
"performance",
14-
"fast",
15-
"faster"
16-
],
17-
"author": {
18-
"name": "Sindre Sorhus",
19-
"email": "[email protected]",
20-
"url": "sindresorhus.com"
21-
},
22-
"repository": "sindresorhus/grunt-concurrent",
23-
"scripts": {
24-
"test": "xo && grunt"
25-
},
26-
"files": [
27-
"tasks"
28-
],
29-
"engines": {
30-
"node": ">=0.10.0"
31-
},
32-
"license": "MIT",
33-
"dependencies": {
34-
"arrify": "^1.0.1",
35-
"async": "^1.2.1",
36-
"indent-string": "^2.0.0",
37-
"pad-stream": "^1.0.0"
38-
},
39-
"devDependencies": {
40-
"cross-spawn": "^2.0.0",
41-
"grunt": "^0.4.5",
42-
"grunt-cli": "^0.1.13",
43-
"grunt-contrib-clean": "^0.7.0",
44-
"grunt-contrib-watch": "^0.6.1",
45-
"grunt-nodemon": "^0.4.0",
46-
"grunt-simple-mocha": "^0.4.0",
47-
"nodemon": "^1.2.1",
48-
"path-exists": "^2.0.0",
49-
"supports-color": "^3.1.2",
50-
"xo": "*"
51-
},
52-
"peerDependencies": {
53-
"grunt": ">=0.4.0"
54-
}
2+
"name": "grunt-concurrent",
3+
"version": "2.3.1",
4+
"description": "Run grunt tasks concurrently",
5+
"license": "MIT",
6+
"repository": "sindresorhus/grunt-concurrent",
7+
"author": {
8+
"name": "Sindre Sorhus",
9+
"email": "[email protected]",
10+
"url": "sindresorhus.com"
11+
},
12+
"engines": {
13+
"node": ">=8"
14+
},
15+
"scripts": {
16+
"test": "xo && grunt"
17+
},
18+
"files": [
19+
"tasks"
20+
],
21+
"keywords": [
22+
"gruntplugin",
23+
"concurrent",
24+
"parallel",
25+
"simultaneous",
26+
"optimize",
27+
"speed",
28+
"perf",
29+
"performance",
30+
"fast",
31+
"faster"
32+
],
33+
"dependencies": {
34+
"arrify": "^2.0.1",
35+
"async": "^3.0.1",
36+
"indent-string": "^4.0.0",
37+
"pad-stream": "^2.0.0"
38+
},
39+
"devDependencies": {
40+
"cross-spawn": "^6.0.5",
41+
"grunt": "^1.0.4",
42+
"grunt-cli": "^1.3.2",
43+
"grunt-contrib-clean": "^2.0.0",
44+
"grunt-contrib-watch": "^1.1.0",
45+
"grunt-nodemon": "^0.4.0",
46+
"grunt-simple-mocha": "^0.4.0",
47+
"nodemon": "^1.2.1",
48+
"path-exists": "^4.0.0",
49+
"supports-color": "^6.1.0",
50+
"xo": "^0.24.0"
51+
},
52+
"peerDependencies": {
53+
"grunt": ">=1"
54+
}
5555
}

readme.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
> Run grunt tasks concurrently
44
5-
---
6-
7-
<p align="center"><b>🔥 Want to strengthen your core JavaScript skills and master ES6?</b><br>I would personally recommend this awesome <a href="https://ES6.io/friend/AWESOME">ES6 course</a> by Wes Bos.</p>
8-
9-
---
10-
115
<img src="screenshot.png" width="439">
126

137
Running slow tasks like Coffee and Sass concurrently can potentially improve your build time significantly. This task is also useful if you need to run [multiple blocking tasks](#logconcurrentoutput) like `nodemon` and `watch` at once.
@@ -23,7 +17,7 @@ $ npm install --save-dev grunt-concurrent
2317
## Usage
2418

2519
```js
26-
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks
20+
require('load-grunt-tasks')(grunt);
2721

2822
grunt.initConfig({
2923
concurrent: {
@@ -32,8 +26,7 @@ grunt.initConfig({
3226
}
3327
});
3428

35-
// tasks of target1 run concurrently, after they all finished, tasks of target2 run concurrently,
36-
// instead of target1 and target2 run concurrently.
29+
// Tasks of target1 run concurrently, after they all finished, tasks of target2 run concurrently, instead of target1 and target2 running concurrently.
3730
grunt.registerTask('default', ['concurrent:target1', 'concurrent:target2']);
3831
```
3932

@@ -46,6 +39,7 @@ grunt.initConfig({
4639
}
4740
});
4841
```
42+
4943
Now `jshint` will always be done before `coffee` and `sass` runs independent of both of them.
5044

5145

@@ -82,8 +76,3 @@ grunt.registerTask('default', ['concurrent:target']);
8276
```
8377

8478
*The output will be messy when combining certain tasks. This option is best used with tasks that don't exit like `watch` and `nodemon` to monitor the output of long-running concurrent tasks.*
85-
86-
87-
## License
88-
89-
MIT © [Sindre Sorhus](http://sindresorhus.com)

0 commit comments

Comments
 (0)