Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Tests, PeerDependencies and update Babel and Webpack #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [ "react", "es2015", "stage-0" ]
}
12 changes: 4 additions & 8 deletions __tests__/zoomcontrol-test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import {
default as React
} from 'react';
import React from 'react';

import {
default as TestUtils
} from 'react-addons-test-utils';
import TestUtils from 'react-addons-test-utils';

const expect = require('expect');
const ZoomControl = require('../lib/zoomControl');
import expect from 'expect';
import ZoomControl from '../src/zoomControl';

describe('ZoomControl', () => {

Expand Down
10 changes: 6 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ module.exports = function (config) {
devtool: 'inline-source-map',
module: {
loaders: [
{ test: /\.js$/, loaders: ['babel'], exclude: /node_modules/ }
{
test: /\.jsx?$/, // Match both .js and .jsx files
exclude: /node_modules/,
loader: "babel-loader"
}
]
},
resolve: {
alias: {
'react-d3-map-core': path.join(__dirname, './lib')
}
extensions: ['.webpack.js', '.web.js', '.js', '.jsx']
}
},
webpackServer: {
Expand Down
52 changes: 30 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,49 @@
"build": "rm -rf ./lib && babel -w --stage 0 src --out-dir lib"
},
"author": "ElixirDoc team",
"license": "Apache 2.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "react-d3/react-d3-map-core"
},
"devDependencies": {
"babel-core": "^5.8.24",
"babel-jest": "^5.3.0",
"babel-loader": "^5.3.2",
"babel-core": "^6.24.0",
"babel-jest": "^19.0.0",
"babel-loader": "^6.4.1",
"babel-preset-react": "^6.23.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-stage-0": "^6.22.0",
"css-loader": "^0.18.0",
"dsv-loader": "^1.0.0",
"expect": "^1.13.3",
"json-loader": "^0.5.3",
"jsx-loader": "^0.13.2",
"karma": "^0.13.15",
"karma-chrome-launcher": "^0.2.1",
"karma-cli": "^0.1.1",
"karma-mocha": "^0.2.0",
"karma-sourcemap-loader": "^0.3.6",
"karma-webpack": "^1.7.0",
"mocha": "^2.2.5",
"react": "^0.14.3",
"react-addons-test-utils": "^0.14.0",
"react-dom": "^0.14.0",
"karma": "^1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-mocha": "^1.3.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.3",
"mocha": "^3.2.0",
"react": "^15.4.1",
"react-addons-test-utils": "^15.4.1",
"react-addons-transition-group": "^15.4.1",
"react-dom": "^15.4.1",
"react-hot-loader": "^1.3.0",
"style-loader": "^0.12.4",
"topojson": "^1.6.19",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.11.0"
"topojson": "^2.2.0",
"webpack": "^2.3.0",
"webpack-dev-server": "^2.4.2"
},
"peerDepencies": {
"react": "^0.14.2"
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0",
"react-dom": "^0.14.0 || ^15.0.0",
"react-addons-transition-group": "^0.14.0 || ^15.0.0"
},
"dependencies": {
"d3": "^3.5.11",
"queue-async": "^1.0.7",
"react": "^0.14.3",
"react-addons-css-transition-group": "^0.14.2",
"react-faux-dom": "^2.1.0"
"react-faux-dom": "^3.0.1"
},
"jest": {
"scriptPreprocessor": "./node_modules/babel-jest",
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = [{
{
test: [/\.jsx$/, /\.js$/],
exclude: /node_modules/,
loaders: ["jsx-loader"],
loaders: ["babel-loader"],
},
{
test: /\.css$/,
Expand All @@ -53,6 +53,6 @@ module.exports = [{
},

resolve: {
extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx']
extensions: ['.webpack.js', '.web.js', '.js', '.jsx']
}
}];