-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #107
- Loading branch information
Kent C. Dodds
committed
Mar 29, 2019
1 parent
bfb5b21
commit e0ebca7
Showing
6 changed files
with
47 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
const babelConfig = require('kcd-scripts/babel') | ||
|
||
// we don't want to use babel-macros inside babel-macros... | ||
// and until kcd-scripts gets upgraded to babel-plugin-macros | ||
// we'll have both of those referenced here... | ||
babelConfig.plugins = babelConfig.plugins.filter( | ||
pluginPath => | ||
!pluginPath.includes('babel-macros/') && | ||
!pluginPath.includes('babel-plugin-macros/'), | ||
) | ||
const envPreset = babelConfig.presets.find( | ||
p => p[0] && p[0].includes('preset-env'), | ||
) | ||
envPreset[1].modules = 'commonjs' | ||
module.exports = babelConfig | ||
const getBabelConfig = require('kcd-scripts/babel') | ||
|
||
module.exports = (...args) => { | ||
const babelConfig = getBabelConfig(...args) | ||
babelConfig.plugins = babelConfig.plugins.filter( | ||
pluginPath => | ||
!pluginPath.includes('babel-macros/') && | ||
!pluginPath.includes('babel-plugin-macros/'), | ||
) | ||
const envPreset = babelConfig.presets.find( | ||
p => p[0] && p[0].includes('preset-env'), | ||
) | ||
envPreset[1].modules = 'commonjs' | ||
return babelConfig | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,12 @@ | |
"test": "kcd-scripts test", | ||
"test:update": "npm test -- --updateSnapshot", | ||
"validate": "kcd-scripts validate", | ||
"setup": "npm install && npm run validate -s", | ||
"precommit": "kcd-scripts precommit" | ||
"setup": "npm install && npm run validate -s" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "kcd-scripts pre-commit" | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
|
@@ -28,17 +32,19 @@ | |
"author": "Kent C. Dodds <[email protected]> (http://kentcdodds.com/)", | ||
"license": "MIT", | ||
"dependencies": { | ||
"cosmiconfig": "^5.0.5", | ||
"resolve": "^1.8.1" | ||
"@babel/runtime": "^7.4.2", | ||
"cosmiconfig": "^5.2.0", | ||
"resolve": "^1.10.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.1.0", | ||
"@babel/parser": "^7.1.0", | ||
"@babel/types": "^7.0.0", | ||
"@babel/core": "^7.4.0", | ||
"@babel/parser": "^7.4.2", | ||
"@babel/types": "^7.4.0", | ||
"ast-pretty-print": "^2.0.1", | ||
"babel-plugin-tester": "^5.0.0", | ||
"cpy": "^7.0.0", | ||
"kcd-scripts": "^0.32.1" | ||
"babel-plugin-tester": "^6.0.1", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", | ||
"cpy": "^7.1.0", | ||
"kcd-scripts": "^1.1.3" | ||
}, | ||
"eslintConfig": { | ||
"extends": "./node_modules/kcd-scripts/eslint.js" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import configured from './configurable.macro' | ||
|
||
// eslint-disable-next-line babel/no-unused-expressions | ||
configured`stuff` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters