babelrc-rollup
Advanced tools
Comparing version 1.2.0 to 2.0.0
@@ -6,2 +6,3 @@ 'use strict'; | ||
var fs = require('fs'); | ||
var resolve = require('resolve'); | ||
@@ -25,5 +26,3 @@ function startsWith(string, prefix) { | ||
// Replace the es2015 preset with the es2015-rollup preset. | ||
result.presets = config.presets.map(function (preset) { | ||
return preset === 'es2015' ? 'es2015-rollup' : preset; | ||
}); | ||
result.presets = config.presets.map(mapPreset); | ||
} else if (_key === 'plugins' && config.plugins) { | ||
@@ -46,3 +45,13 @@ // Remove any explicit module plugins, e.g. es2015-modules-commonjs. | ||
function mapPreset(preset) { | ||
try { | ||
// this will throw if it can't resolve it | ||
resolve.sync('babel-preset-' + preset + '-rollup'); | ||
return preset + '-rollup'; | ||
} catch (err) { | ||
return preset; | ||
} | ||
} | ||
exports['default'] = babelrc; | ||
exports.configWithoutModules = configWithoutModules; |
{ | ||
"name": "babelrc-rollup", | ||
"version": "1.2.0", | ||
"description": "Builds a babel configuration for rollup-plugin-babel by reading .babelrc.", | ||
@@ -12,7 +11,8 @@ "main": "dist/babelrc-rollup.js", | ||
"bootstrap": "./script/bootstrap", | ||
"prepublish": "npm test" | ||
"prepublish": "npm test", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/eventualbuddha/babelrc-rollup.git" | ||
"url": "https://github.com/eventualbuddha/babelrc-rollup.git" | ||
}, | ||
@@ -35,2 +35,3 @@ "keywords": [ | ||
"babel-plugin-syntax-flow": "^6.8.0", | ||
"babel-plugin-transform-es2015-parameters": "^6.9.0", | ||
"babel-plugin-transform-flow-strip-types": "^6.8.0", | ||
@@ -41,7 +42,12 @@ "babel-preset-es2015": "^6.9.0", | ||
"rollup": "^0.33.0", | ||
"rollup-plugin-babel": "^2.6.1" | ||
"rollup-plugin-babel": "^2.6.1", | ||
"semantic-release": "^4.3.5" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
} | ||
} | ||
}, | ||
"dependencies": { | ||
"resolve": "^1.1.7" | ||
}, | ||
"version": "2.0.0" | ||
} |
@@ -39,2 +39,5 @@ # babelrc-rollup | ||
For any presets you use in `.babelrc`, this module will look for one with the | ||
same name but with a `-rollup` suffix. | ||
[rollup-config]: https://github.com/eventualbuddha/babelrc-rollup/blob/master/rollup.config.js |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6237
81
43
1
10
+ Addedresolve@^1.1.7
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)