Skip to content

Commit 54c583e

Browse files
committed
tweaks
1 parent 9772e55 commit 54c583e

File tree

4 files changed

+23
-30
lines changed

4 files changed

+23
-30
lines changed

.jshintrc

-12
This file was deleted.

package.json

+16-13
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,52 @@
11
{
22
"name": "grunt-babel",
33
"version": "5.0.3",
4-
"description": "Turn ES6 code into vanilla ES5 with no runtime required",
4+
"description": "Use next generation JavaScript, today",
55
"license": "MIT",
66
"repository": "babel/grunt-babel",
77
"author": {
88
"name": "Sindre Sorhus",
99
"email": "sindresorhus@gmail.com",
10-
"url": "http://sindresorhus.com"
10+
"url": "sindresorhus.com"
1111
},
1212
"engines": {
1313
"node": ">=0.10.0"
1414
},
1515
"scripts": {
16-
"test": "grunt"
16+
"test": "xo && grunt"
1717
},
1818
"files": [
1919
"tasks"
2020
],
2121
"keywords": [
2222
"gruntplugin",
23+
"babel",
24+
"transpiler",
25+
"es2015",
26+
"es6",
2327
"rewriting",
2428
"transformation",
2529
"syntax",
2630
"codegen",
2731
"desugaring",
2832
"javascript",
2933
"ecmascript",
30-
"language",
31-
"es5",
32-
"es6",
33-
"ES.next",
34-
"harmony",
35-
"compiler",
36-
"transpiler",
37-
"babel"
34+
"compiler"
3835
],
3936
"dependencies": {
40-
"babel-core": "^6.0.2"
37+
"babel-core": "^6.0.12"
4138
},
4239
"devDependencies": {
4340
"babel-preset-es2015": "^6.0.11",
4441
"grunt": "^0.4.5",
4542
"grunt-cli": "^0.1.13",
4643
"grunt-contrib-clean": "^0.6.0",
47-
"grunt-contrib-nodeunit": "^0.4.1"
44+
"grunt-contrib-nodeunit": "^0.4.1",
45+
"xo": "*"
46+
},
47+
"xo": {
48+
"ignores": [
49+
"test/fixture.js"
50+
]
4851
}
4952
}

readme.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# grunt-babel [![Build Status](https://travis-ci.org/babel/grunt-babel.svg?branch=master)](https://travis-ci.org/babel/grunt-babel)
22

3-
> Turn ES6 code into vanilla ES5 with no runtime required using [babel](https://github.com/babel/babel)
3+
> Use next generation JavaScript, today, with [Babel](https://babeljs.io)
44
5-
*Issues with the output should be reported on the babel [issue tracker](https://github.com/babel/babel/issues).*
5+
*Issues with the output should be reported on the Babel [issue tracker](https://github.com/babel/babel/issues).*
66

77

88
## Install
@@ -37,7 +37,7 @@ grunt.registerTask('default', ['babel']);
3737

3838
## Options
3939

40-
See the `babel` [options](https://babeljs.io/docs/usage/options), except for `filename` which is handled for you.
40+
See the Babel [options](https://babeljs.io/docs/usage/options), except for `filename` which is handled for you.
4141

4242

4343
## License

tasks/babel.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@ var path = require('path');
33
var babel = require('babel-core');
44

55
module.exports = function (grunt) {
6-
grunt.registerMultiTask('babel', 'Transpile ES6 to ES5', function () {
6+
grunt.registerMultiTask('babel', 'Use next generation JavaScript, today', function () {
77
var options = this.options();
88

99
this.files.forEach(function (el) {
1010
delete options.filename;
1111
delete options.filenameRelative;
1212

1313
options.sourceFileName = path.relative(path.dirname(el.dest), el.src[0]);
14+
1415
if (process.platform === 'win32') {
1516
options.sourceFileName = options.sourceFileName.replace(/\\/g, '/');
1617
}
18+
1719
options.sourceMapTarget = path.basename(el.dest);
1820

1921
var res = babel.transformFileSync(el.src[0], options);
20-
2122
var sourceMappingURL = '';
23+
2224
if (res.map) {
2325
sourceMappingURL = '\n//# sourceMappingURL=' + path.basename(el.dest) + '.map';
2426
}

0 commit comments

Comments
 (0)