diff --git a/.codeclimate.yml b/.codeclimate.yml index 821c1a18..fa8e9b45 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -9,7 +9,7 @@ engines: javascript: ratings: paths: - - lib/** + - src/** - "**.js" exclude_paths: - "specs/" diff --git a/examples/basic/app.js b/examples/basic/app.js index f2953dbe..96fdad35 100644 --- a/examples/basic/app.js +++ b/examples/basic/app.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import ReactDOM from 'react-dom'; -import Modal from '../../lib/index'; +import Modal from '../../src/index'; const appElement = document.getElementById('example'); diff --git a/package.json b/package.json index 326b2a8f..a33d20ca 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "scripts": { "start": "./node_modules/.bin/webpack-dev-server --inline --host 127.0.0.1 --content-base examples/", - "test": "cross-env NODE_ENV=test karma start", + "test": "cross-env BABEL_ENV=commonjs NODE_ENV=test karma start", "lint": "eslint lib/", "clean": "rimraf lib es", "build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib", diff --git a/specs/Modal.events.spec.js b/specs/Modal.events.spec.js index 63608be3..f1fb9e95 100644 --- a/specs/Modal.events.spec.js +++ b/specs/Modal.events.spec.js @@ -4,7 +4,7 @@ import expect from 'expect'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; -import Modal from '../lib/components/Modal'; +import Modal from '../src/components/Modal'; import { moverlay, mcontent, clickAt, mouseDownAt, mouseUpAt, escKeyDown, tabKeyDown, diff --git a/specs/Modal.spec.js b/specs/Modal.spec.js index 4309b47a..451223ae 100644 --- a/specs/Modal.spec.js +++ b/specs/Modal.spec.js @@ -4,8 +4,8 @@ import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import createReactClass from 'create-react-class'; -import Modal from '../lib/components/Modal'; -import * as ariaAppHider from '../lib/helpers/ariaAppHider'; +import Modal from '../src/components/Modal'; +import * as ariaAppHider from '../src/helpers/ariaAppHider'; import { isBodyWithReactModalOpenClass, contentAttribute, diff --git a/specs/Modal.style.spec.js b/specs/Modal.style.spec.js index 53a361e3..142a7857 100644 --- a/specs/Modal.style.spec.js +++ b/specs/Modal.style.spec.js @@ -3,8 +3,8 @@ import expect from 'expect'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; -import Modal from '../lib/components/Modal'; -import * as ariaAppHider from '../lib/helpers/ariaAppHider'; +import Modal from '../src/components/Modal'; +import * as ariaAppHider from '../src/helpers/ariaAppHider'; import { mcontent, moverlay, renderModal, emptyDOM diff --git a/specs/helper.js b/specs/helper.js index 27803ebb..0d2cffc0 100644 --- a/specs/helper.js +++ b/specs/helper.js @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import Modal from '../lib/components/Modal'; +import Modal from '../src/components/Modal'; import TestUtils from 'react-addons-test-utils'; const divStack = []; diff --git a/specs/spec_index.js b/specs/spec_index.js index 363463c4..2d24be84 100644 --- a/specs/spec_index.js +++ b/specs/spec_index.js @@ -8,7 +8,7 @@ testsContext.keys().forEach((path) => { } }); -const componentsContext = require.context('../lib', true, /\.js$/); +const componentsContext = require.context('../src', true, /\.js$/); componentsContext.keys().forEach((path) => { try { componentsContext(path); diff --git a/webpack.dist.config.js b/webpack.dist.config.js index 1ed9a761..2aa4a059 100644 --- a/webpack.dist.config.js +++ b/webpack.dist.config.js @@ -17,8 +17,8 @@ var reactDOMExternal = { module.exports = { entry: { - 'react-modal': './lib/index.js', - 'react-modal.min': './lib/index.js' + 'react-modal': './src/index.js', + 'react-modal.min': './src/index.js' }, externals: { diff --git a/webpack.test.config.js b/webpack.test.config.js index 9639e227..85302c6a 100644 --- a/webpack.test.config.js +++ b/webpack.test.config.js @@ -10,7 +10,7 @@ if (process.env.CONTINUOUS_INTEGRATION || process.env.COVERAGE) { commonConfig.module.postLoaders = commonConfig.module.postLoaders || []; commonConfig.module.postLoaders.push({ test: /\.js$/, - include: path.resolve('lib'), + include: path.resolve('src'), loader: 'istanbul-instrumenter' }); }