Skip to content

Commit acd3ed9

Browse files
committed
#305: combine
1 parent 69573fc commit acd3ed9

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

Gruntfile.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
* SPDX-License-Identifier: MIT
44
*/
55

6-
const fs = require('fs')
7-
const cp = require('child_process')
6+
const fs = require('fs');
7+
const cp = require('child_process');
88
const path = require('path');
99
const validate = require('css-validator');
10-
const {glob} = require('glob');
11-
const pattern = `2015-${new Date().getFullYear()}`;
10+
const {glob} = require('glob'),
11+
pattern = `2015-${new Date().getFullYear()}`;
1212

1313
module.exports = (grunt) => {
1414
grunt.util.linefeed = '\n';
@@ -78,17 +78,19 @@ module.exports = (grunt) => {
7878
},
7979
}
8080
);
81+
8182
require('load-grunt-tasks')(grunt, { scope: 'devDependencies' });
8283

8384
grunt.registerTask('checkYear', 'Checks the year patterns in copyright lines in source files.', () => {
8485
const invalidFiles = cp.execSync('git ls-files LICENSE "*.scss" "*.html" "*.js"').toString().trim().split('\n').filter(
8586
file => !fs.readFileSync(file).toString().includes(pattern)
8687
);
8788
invalidFiles.forEach(file => {
88-
grunt.log.error(`The file, ${file}, does not include the pattern: ${pattern}`)
89-
})
89+
grunt.log.error(`The file, ${file}, does not include the pattern: ${pattern}`);
90+
});
9091
return invalidFiles.length === 0
91-
})
92+
});
93+
9294
grunt.registerTask('validate', 'validate css bundle with W3C Jigsaw', () => {
9395
let css = '', srcPath = '';
9496
glob("*.css", {}, (err, files) => {
@@ -103,9 +105,10 @@ module.exports = (grunt) => {
103105
done(false);
104106
}
105107
});
106-
})
107-
})
108-
})
108+
});
109+
});
110+
});
111+
109112
grunt.registerTask('default', ['sasslint', 'sass:dist', 'sass:uncompressed', 'css_purge', 'checkYear', 'validate']);
110113
grunt.registerTask('rultor', ['sasslint', 'sass:dist', 'sass:uncompressed', 'css_purge', 'checkYear', 'validate']);
111114
grunt.registerTask('dev', ['sasslint', 'sass:dev', 'css_purge', 'watch']);

0 commit comments

Comments
 (0)