Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
Update Infra #969 - Replace isparta with istanbul
Browse files Browse the repository at this point in the history
  • Loading branch information
blainekasten committed Dec 5, 2018
1 parent d505be0 commit 248cd68
Show file tree
Hide file tree
Showing 4 changed files with 287 additions and 81 deletions.
5 changes: 3 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
"react"
],
"env": {
"commonjs": {
"test": {
"presets": [
"env",
"stage-1",
"react"
],
"plugins": [
"transform-decorators-legacy"
"transform-decorators-legacy",
"istanbul"
]
}
}
Expand Down
14 changes: 1 addition & 13 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
const path = require('path');

// Note: If we switch to ESM version of babelified files, we'll likely need to
// update from the ancient isparta-loader. Likely we'll switch to:
// https://github.com/istanbuljs/babel-plugin-istanbul with a `test` BABEL_ENV
//
// https://github.com/FormidableLabs/radium/issues/969
process.env.BABEL_ENV = 'commonjs';
process.env.BABEL_ENV = 'test';

module.exports = function(config) {
config.set({
Expand Down Expand Up @@ -34,13 +29,6 @@ module.exports = function(config) {
include: path.resolve('src/__tests__/'),
loader: 'babel-loader'
},
{
test: /\.js$/,
include: path.resolve('src/'),
enforce: 'pre',
exclude: /(__tests__|__mocks__)/,
loader: 'isparta-loader?babel-loader'
},
{
test: /\.js$/,
exclude: [/node_modules/],
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"version-dry-run": "publishr dry-run -V",
"build": "npm run clean && builder concurrent --buffer build-lib build-dist build-es",
"build-babel": "babel src --ignore \"/__tests__/,/__mocks__/\"",
"build-lib": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"commonjs\\\"}\" build-babel -- -d lib",
"build-lib": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"test\\\"}\" build-babel -- -d lib",
"build-dist-dev": "webpack",
"build-dist-prod": "webpack --config=webpack.config.minified.js",
"build-dist": "builder concurrent --buffer build-dist-dev build-dist-prod",
Expand All @@ -37,7 +37,7 @@
"eslint": "eslint .",
"fixlint": "npm run eslint -- --fix",
"lint": "builder concurrent --buffer eslint flow",
"start": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"commonjs\\\"}\" examples-server",
"start": "builder run --env \"{\\\"BABEL_ENV\\\":\\\"test\\\"}\" examples-server",
"test-node": "mocha \"test/**/*-test.js\"",
"test-node-dev": "mocha --watch \"test/**/*-test.js\"",
"test-frontend": "karma start",
Expand Down Expand Up @@ -74,6 +74,7 @@
},
"devDependencies": {
"babel-eslint": "^7.1.1",
"babel-plugin-istanbul": "^5.1.0",
"caniuse-api": "^2.0.0",
"chai": "^3.5.0",
"color": "^1.0.3",
Expand All @@ -89,7 +90,6 @@
"express-http-proxy": "^0.11.0",
"flow-bin": "^0.53.1",
"inject-loader": "^3.0.1",
"isparta-loader": "^2.0.0",
"jsdom": "^12.0.0",
"jsdom-global": "^3.0.2",
"karma": "^3.0.0",
Expand Down
Loading

0 comments on commit 248cd68

Please sign in to comment.