Skip to content
This repository was archived by the owner on Mar 26, 2018. It is now read-only.

Commit c7feb0c

Browse files
committed
meta tweaks
1 parent 29bf693 commit c7feb0c

File tree

9 files changed

+41
-104
lines changed

9 files changed

+41
-104
lines changed

.editorconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# editorconfig.org
21
root = true
32

43
[*]
@@ -8,6 +7,3 @@ end_of_line = lf
87
charset = utf-8
98
trim_trailing_whitespace = true
109
insert_final_newline = true
11-
12-
[*.md]
13-
trim_trailing_whitespace = false

.jscsrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

.jshintrc

Lines changed: 0 additions & 26 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- 'iojs'
4+
- '5'
5+
- '4'
56
- '0.12'
67
- '0.10'

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide, as it explains how to create a [gruntfile][Getting Started] as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:
99

10-
```sh
10+
```
1111
$ npm install --save-dev grunt-filerev
1212
```
1313

@@ -39,33 +39,33 @@ grunt.initConfig({
3939

4040
### Options
4141

42-
#### options.algorithm
42+
#### algorithm
4343

44-
Type: `string`
44+
Type: `string`<br>
4545
Default: `'md5'`
4646

4747
`algorithm` is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are `'sha1'`, `'md5'`, `'sha256'`, `'sha512'`, etc. On recent releases, `openssl list-message-digest-algorithms` will display the available digest algorithms.
4848

49-
#### options.length
49+
#### length
5050

51-
Type: `number`
51+
Type: `number`<br>
5252
Default: `8`
5353

54-
The number of characters of the file hash to prefix the file name with.
54+
Number of characters of the file hash to prefix the file name with.
5555

56-
#### options.process(basename, name, extension)
56+
#### process(basename, name, extension)
5757

58-
Type: `function`
59-
Default: `null`
58+
Type: `function`<br>
59+
Default: `null`<br>
6060
Returns: `string`
6161

62-
A function to process the revised file name and return back the new file name.
62+
Function to process the revised file name and return back the new file name.
6363

6464
##### basename
6565

6666
Type: `string`
6767

68-
The basename of the file.
68+
Basename of the file.
6969

7070
##### name
7171

@@ -125,6 +125,7 @@ The task will ensure that any source map for `.css` or `.js` file is revisioned
125125

126126
For example, `js/main.js` revisioned to `js/main.9d713a59.js` will also have `js/main.js.map` revisioned to the same hash `js/main.9d713a59.js.map`.
127127

128+
128129
## License
129130

130131
[BSD license](http://opensource.org/licenses/bsd-license.php) and copyright Google

Gruntfile.js renamed to gruntfile.js

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,6 @@ var path = require('path');
44

55
module.exports = function (grunt) {
66
grunt.initConfig({
7-
jshint: {
8-
options: {
9-
jshintrc: '.jshintrc'
10-
},
11-
all: [
12-
'Gruntfile.js',
13-
'lib/*.js',
14-
'tasks/*.js',
15-
'test/**/*.js',
16-
'!test/tmp/*'
17-
]
18-
},
19-
20-
jscs: {
21-
options: {
22-
config: '.jscsrc'
23-
},
24-
all: {
25-
src: ['<%= jshint.all %>']
26-
}
27-
},
28-
297
copy: {
308
test: {
319
flatten: true,
@@ -92,12 +70,8 @@ module.exports = function (grunt) {
9270
grunt.loadNpmTasks('grunt-contrib-clean');
9371
grunt.loadNpmTasks('grunt-contrib-copy');
9472
grunt.loadNpmTasks('grunt-simple-mocha');
95-
grunt.loadNpmTasks('grunt-contrib-jshint');
96-
grunt.loadNpmTasks('grunt-jscs');
9773

9874
grunt.registerTask('default', [
99-
'jshint',
100-
'jscs',
10175
'clean',
10276
'copy',
10377
'filerev',

package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,36 @@
1313
"author": {
1414
"name": "Frederick Ros",
1515
"email": "frederick.ros@gmail.com",
16-
"url": "https://github.com/sleeper"
16+
"url": "github.com/sleeper"
1717
},
1818
"repository": "yeoman/grunt-filerev",
1919
"scripts": {
20-
"test": "grunt"
20+
"test": "xo && grunt"
2121
},
2222
"files": [
2323
"tasks"
2424
],
25+
"engines": {
26+
"node": ">=0.10.0"
27+
},
28+
"license": "BSD-2-Clause",
2529
"dependencies": {
2630
"chalk": "^1.0.0",
2731
"convert-source-map": "^1.0.0",
2832
"each-async": "^0.1.3"
2933
},
3034
"devDependencies": {
31-
"grunt": "^0.4.5",
32-
"grunt-cli": "^0.1.13",
33-
"grunt-contrib-clean": "^0.6.0",
34-
"grunt-contrib-copy": "^0.8.0",
35-
"grunt-contrib-jshint": "^0.11.0",
36-
"grunt-jscs": "^1.5.0",
37-
"grunt-simple-mocha": "^0.4.0"
35+
"grunt": "^1.0.1",
36+
"grunt-cli": "^1.2.0",
37+
"grunt-contrib-clean": "^1.0.0",
38+
"grunt-contrib-copy": "^1.0.0",
39+
"grunt-simple-mocha": "^0.4.0",
40+
"xo": "*"
3841
},
3942
"peerDependencies": {
4043
"grunt": ">=0.4.0"
4144
},
42-
"engines": {
43-
"node": ">=0.10.0"
44-
},
45-
"license": "BSD-2-Clause"
45+
"xo": {
46+
"space": true
47+
}
4648
}

tasks/filerev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = function (grunt) {
2929
var stat = fs.lstatSync(el.dest);
3030

3131
if (stat && !stat.isDirectory()) {
32-
grunt.fail.fatal('Destination ' + el.dest + ' for target ' + target + ' is not a directory');
32+
grunt.fail.fatal('Destination ' + el.dest + ' for target ' + target + ' is not a directory');
3333
}
3434
} catch (err) {
3535
grunt.verbose.writeln('Destination dir ' + el.dest + ' does not exists for target ' + target + ': creating');

test/test.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
'use strict';
2+
/* eslint-env mocha */
23
var fs = require('fs');
34
var assert = require('assert');
45

56
var hashes = {
6-
'test/fixtures/file.png' : 'test/tmp/file.26365248.png',
7-
'test/fixtures/cfgfile.png' : 'test/tmp/cfgfile.da63.png',
8-
'test/fixtures/math.js' : 'test/tmp/withSourceMaps/math.6272e937.js',
9-
'test/fixtures/math.js.map' : 'test/tmp/withSourceMaps/math.6272e937.js.map',
10-
'test/fixtures/physics.js' : 'test/tmp/withSourceMaps/physics.28cb15fd.js',
11-
'test/fixtures/styles.css' : 'test/tmp/withSourceMaps/styles.a6aa2292.css',
12-
'test/fixtures/styles.css.map' : 'test/tmp/withSourceMaps/styles.a6aa2292.css.map',
13-
'test/fixtures/more-styles.css' : 'test/tmp/withSourceMaps/more-styles.dce8e0e5.css',
14-
'test/fixtures/inline.js' : 'test/tmp/withSourceMaps/inline.8b435ef2.js',
15-
'test/fixtures/another.png' : 'test/tmp/another-processed-92279d3f.png'
7+
'test/fixtures/file.png': 'test/tmp/file.26365248.png',
8+
'test/fixtures/cfgfile.png': 'test/tmp/cfgfile.da63.png',
9+
'test/fixtures/math.js': 'test/tmp/withSourceMaps/math.6272e937.js',
10+
'test/fixtures/math.js.map': 'test/tmp/withSourceMaps/math.6272e937.js.map',
11+
'test/fixtures/physics.js': 'test/tmp/withSourceMaps/physics.28cb15fd.js',
12+
'test/fixtures/styles.css': 'test/tmp/withSourceMaps/styles.a6aa2292.css',
13+
'test/fixtures/styles.css.map': 'test/tmp/withSourceMaps/styles.a6aa2292.css.map',
14+
'test/fixtures/more-styles.css': 'test/tmp/withSourceMaps/more-styles.dce8e0e5.css',
15+
'test/fixtures/inline.js': 'test/tmp/withSourceMaps/inline.8b435ef2.js',
16+
'test/fixtures/another.png': 'test/tmp/another-processed-92279d3f.png'
1617
};
1718

1819
it('should revision files based on content', function () {

0 commit comments

Comments
 (0)