Skip to content

Commit 182d21a

Browse files
committed
#305: polish
1 parent dd62c63 commit 182d21a

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

Gruntfile.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ module.exports = function (grunt) {
1616
{
1717
css_purge: {
1818
dist: {
19-
options: {},
2019
files: {
2120
'dist/<%= pkg.name %>-<%= pkg.version %>.min.css': 'dist/<%= pkg.name %>-<%= pkg.version %>.min.css',
2221
'dist/<%= pkg.name %>.min.css': 'dist/<%= pkg.name %>.min.css'
23-
}
22+
},
23+
options: {}
2424
},
2525
uncompressed: {
26-
options: {},
2726
files: {
2827
'dist/<%= pkg.name %>-<%= pkg.version %>.css': 'dist/<%= pkg.name %>-<%= pkg.version %>.css',
2928
'dist/<%= pkg.name %>.css': 'dist/<%= pkg.name %>.css'
30-
}
29+
},
30+
options: {}
3131
},
3232
},
3333
pkg: grunt.file.readJSON('package.json'),
@@ -80,22 +80,22 @@ module.exports = function (grunt) {
8080
require('load-grunt-tasks')(grunt, { scope: 'devDependencies' });
8181

8282
grunt.registerTask('checkYear', 'Checks the year patterns in copyright lines in source files.', () => {
83-
const pattern = `2015-${new Date().getFullYear()}`;
84-
const invalidFiles = cp.execSync('git ls-files LICENSE "*.scss" "*.html" "*.js"').toString().trim().split('\n').filter(file => {
85-
return !fs.readFileSync(file).toString().includes(pattern)
86-
})
83+
const pattern = `2015-${new Date().getFullYear()}`,
84+
invalidFiles = cp.execSync('git ls-files LICENSE "*.scss" "*.html" "*.js"').toString().trim().split('\n').filter(
85+
file => !fs.readFileSync(file).toString().includes(pattern)
86+
);
8787
invalidFiles.forEach(file => {
8888
grunt.log.error(`The file, ${file}, does not include the pattern: ${pattern}`)
8989
})
9090
return invalidFiles.length === 0
9191
})
92-
grunt.registerTask('validate', 'validate css bundle with W3C Jigsaw', function () {
93-
let srcPath = '', css = '';
92+
grunt.registerTask('validate', 'validate css bundle with W3C Jigsaw', () => {
93+
let css = '', srcPath = '';
9494
glob("*.css", {}, (err, files) => {
95-
files.map(file => {
96-
srcPath = path.join(__dirname + '/dist', file);
95+
files.forEach(file => {
96+
const done = this.async();
97+
srcPath = path.join(`${__dirname}/dist`, file);
9798
css = grunt.file.read(srcPath);
98-
var done = this.async();
9999
validate({ text: `${css}` }, (error, data) => {
100100
if (data.validity) {
101101
done(true);

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = [
2020
'max-len': ['error', { code: 200 }],
2121
'max-lines-per-function': 'off',
2222
'no-magic-numbers': 'off',
23+
camelcase
2324
'no-undef': 'off'
2425
}
2526
}

scss/_tables.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ table {
3939
tr {
4040
border-bottom-width: .12 * $em;
4141

42+
&:hover {
43+
background-color: lighten($gray, 10);
44+
}
45+
4246
th {
4347
border-bottom-width: .12 * $em;
4448
}

0 commit comments

Comments
 (0)