diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54b87bde..564ab34a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,11 +8,11 @@ Thanks for contributing! npm install ``` -You will find all building blocks that make up Radium in the [`modules`](modules) folder. +You will find all building blocks that make up Radium in the [`src`](src) folder. ### Testing -You will find tests for each module inside [`modules/__tests__`](modules/__tests__). Whenever making any changes, ensure that all existing tests pass by running `npm run test`. You can also have [`Karma`](http://karma-runner.github.io/) running in the background and run your tests every time you make a change by doing `npm run test-dev`. +You will find tests for each module inside [`src/__tests__`](src/__tests__). Whenever making any changes, ensure that all existing tests pass by running `npm run test`. You can also have [`Karma`](http://karma-runner.github.io/) running in the background and run your tests every time you make a change by doing `npm run test-dev`. If you are adding a new feature or some extra functionality, you should also make sure to accompany those changes with appropriate tests. diff --git a/bower.json b/bower.json index e698b5b4..9633af6e 100644 --- a/bower.json +++ b/bower.json @@ -22,7 +22,7 @@ "karma.conf.coverage.js", "karma.conf.js", "lib", - "modules", + "src", "node_modules", "package.json", "webpack.config.js", diff --git a/examples/app.jsx b/examples/app.jsx index 5ee05be2..d3bc2977 100644 --- a/examples/app.jsx +++ b/examples/app.jsx @@ -15,9 +15,9 @@ var React = require('react'); var Button = require('./components/button.jsx'); var ComputedWell = require('./components/computed-well.jsx'); -var Style = require('../modules/components/style.js'); -var PrintStyleSheet = require('../modules/components/print-style-sheet.js'); -var Radium = require('../modules'); +var Style = require('../src/components/style.js'); +var PrintStyleSheet = require('../src/components/print-style-sheet.js'); +var Radium = require('../src'); // // Radium with ES6 class syntax diff --git a/examples/components/button.jsx b/examples/components/button.jsx index 03f382b2..d687bc1c 100644 --- a/examples/components/button.jsx +++ b/examples/components/button.jsx @@ -11,7 +11,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -var Radium = require('../../modules'); +var Radium = require('../../src'); var React = require('react'); @Radium diff --git a/examples/components/computed-well.jsx b/examples/components/computed-well.jsx index 3cae9cb2..d79501de 100644 --- a/examples/components/computed-well.jsx +++ b/examples/components/computed-well.jsx @@ -12,7 +12,7 @@ */ var React = require('react'); -var Radium = require('../../modules/index'); +var Radium = require('../../src/index'); var ComputedWell = React.createClass({ getInitialState: function () { diff --git a/karma.conf.js b/karma.conf.js index a4140ae1..a1cf540c 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -4,21 +4,21 @@ module.exports = function (config) { basePath: '', frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'], files: [ - 'modules/__tests__/**/*.js' + 'src/__tests__/**/*.js' ], preprocessors: { - 'modules/__tests__/**/*.js': ['webpack'] + 'src/__tests__/**/*.js': ['webpack'] }, webpack: { cache: true, module: { preLoaders: [{ test: /\.jsx?$/, - include: path.resolve('modules/__tests__/'), + include: path.resolve('src/__tests__/'), loader: 'babel' }, { test: /\.jsx?$/, - include: path.resolve('modules/'), + include: path.resolve('src/'), exclude: /(__tests__|__mocks__)/, loader: 'isparta?babel' }], @@ -33,7 +33,7 @@ module.exports = function (config) { }, resolve: { root: [__dirname], - modulesDirectories: ['node_modules', 'modules'], + modulesDirectories: ['node_modules', 'src'], extensions: ['', '.js', '.jsx'] } }, diff --git a/package.json b/package.json index f3fb8806..f8225858 100644 --- a/package.json +++ b/package.json @@ -13,12 +13,12 @@ "example": "examples" }, "scripts": { - "babel": "rimraf lib && babel modules/ -d lib/", + "babel": "rimraf lib && babel src/ -d lib/", "dist": "webpack && webpack --config=webpack.config.minified.js", "examples": "webpack-dev-server --config examples/webpack.config.js --no-info --content-base examples/", "flow": "node -e \"process.exit(process.platform === 'win32' ? 0 : 1)\" || flow check", "lib": "npm run babel && rimraf lib/__tests__ lib/__mocks__", - "lint": "eslint modules && npm run flow", + "lint": "eslint src && npm run flow", "postinstall": "node -e \"require('fs').stat('lib', function(e,s){process.exit(e || !s.isDirectory() ? 1 : 0)})\" || npm run lib", "prepublish": "npm test && npm run lint && npm run lib", "start": "./node_modules/.bin/babel-node --stage 0 examples/server.js", diff --git a/modules/__mocks__/exenv.js b/src/__mocks__/exenv.js similarity index 100% rename from modules/__mocks__/exenv.js rename to src/__mocks__/exenv.js diff --git a/modules/__mocks__/prefixer.js b/src/__mocks__/prefixer.js similarity index 100% rename from modules/__mocks__/prefixer.js rename to src/__mocks__/prefixer.js diff --git a/modules/__tests__/camel-case-props-to-dash-case-test.js b/src/__tests__/camel-case-props-to-dash-case-test.js similarity index 100% rename from modules/__tests__/camel-case-props-to-dash-case-test.js rename to src/__tests__/camel-case-props-to-dash-case-test.js diff --git a/modules/__tests__/enhancer-test.js b/src/__tests__/enhancer-test.js similarity index 100% rename from modules/__tests__/enhancer-test.js rename to src/__tests__/enhancer-test.js diff --git a/modules/__tests__/get-state-test.js b/src/__tests__/get-state-test.js similarity index 100% rename from modules/__tests__/get-state-test.js rename to src/__tests__/get-state-test.js diff --git a/modules/__tests__/keyframes-test.js b/src/__tests__/keyframes-test.js similarity index 100% rename from modules/__tests__/keyframes-test.js rename to src/__tests__/keyframes-test.js diff --git a/modules/__tests__/prefixer-test.js b/src/__tests__/prefixer-test.js similarity index 100% rename from modules/__tests__/prefixer-test.js rename to src/__tests__/prefixer-test.js diff --git a/modules/__tests__/radium-test.js b/src/__tests__/radium-test.js similarity index 100% rename from modules/__tests__/radium-test.js rename to src/__tests__/radium-test.js diff --git a/modules/__tests__/resolve-styles-test.js b/src/__tests__/resolve-styles-test.js similarity index 100% rename from modules/__tests__/resolve-styles-test.js rename to src/__tests__/resolve-styles-test.js diff --git a/modules/camel-case-props-to-dash-case.js b/src/camel-case-props-to-dash-case.js similarity index 100% rename from modules/camel-case-props-to-dash-case.js rename to src/camel-case-props-to-dash-case.js diff --git a/modules/components/print-style-sheet.js b/src/components/print-style-sheet.js similarity index 100% rename from modules/components/print-style-sheet.js rename to src/components/print-style-sheet.js diff --git a/modules/components/style.js b/src/components/style.js similarity index 100% rename from modules/components/style.js rename to src/components/style.js diff --git a/modules/config.js b/src/config.js similarity index 100% rename from modules/config.js rename to src/config.js diff --git a/modules/create-markup-for-styles.js b/src/create-markup-for-styles.js similarity index 100% rename from modules/create-markup-for-styles.js rename to src/create-markup-for-styles.js diff --git a/modules/enhancer.js b/src/enhancer.js similarity index 100% rename from modules/enhancer.js rename to src/enhancer.js diff --git a/modules/get-state-key.js b/src/get-state-key.js similarity index 100% rename from modules/get-state-key.js rename to src/get-state-key.js diff --git a/modules/get-state.js b/src/get-state.js similarity index 100% rename from modules/get-state.js rename to src/get-state.js diff --git a/modules/index.js b/src/index.js similarity index 100% rename from modules/index.js rename to src/index.js diff --git a/modules/keyframes.js b/src/keyframes.js similarity index 100% rename from modules/keyframes.js rename to src/keyframes.js diff --git a/modules/merge-styles.js b/src/merge-styles.js similarity index 100% rename from modules/merge-styles.js rename to src/merge-styles.js diff --git a/modules/plugins/check-props-plugin.js b/src/plugins/check-props-plugin.js similarity index 100% rename from modules/plugins/check-props-plugin.js rename to src/plugins/check-props-plugin.js diff --git a/modules/plugins/index.js b/src/plugins/index.js similarity index 100% rename from modules/plugins/index.js rename to src/plugins/index.js diff --git a/modules/plugins/merge-style-array-plugin.js b/src/plugins/merge-style-array-plugin.js similarity index 100% rename from modules/plugins/merge-style-array-plugin.js rename to src/plugins/merge-style-array-plugin.js diff --git a/modules/plugins/mouse-up-listener.js b/src/plugins/mouse-up-listener.js similarity index 100% rename from modules/plugins/mouse-up-listener.js rename to src/plugins/mouse-up-listener.js diff --git a/modules/plugins/prefix-plugin.js b/src/plugins/prefix-plugin.js similarity index 100% rename from modules/plugins/prefix-plugin.js rename to src/plugins/prefix-plugin.js diff --git a/modules/plugins/resolve-interaction-styles-plugin.js b/src/plugins/resolve-interaction-styles-plugin.js similarity index 100% rename from modules/plugins/resolve-interaction-styles-plugin.js rename to src/plugins/resolve-interaction-styles-plugin.js diff --git a/modules/plugins/resolve-media-queries-plugin.js b/src/plugins/resolve-media-queries-plugin.js similarity index 100% rename from modules/plugins/resolve-media-queries-plugin.js rename to src/plugins/resolve-media-queries-plugin.js diff --git a/modules/prefixer.js b/src/prefixer.js similarity index 100% rename from modules/prefixer.js rename to src/prefixer.js diff --git a/modules/print-styles.js b/src/print-styles.js similarity index 100% rename from modules/print-styles.js rename to src/print-styles.js diff --git a/modules/resolve-styles.js b/src/resolve-styles.js similarity index 100% rename from modules/resolve-styles.js rename to src/resolve-styles.js diff --git a/webpack.config.js b/webpack.config.js index 2c0200a1..c0a32e52 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,7 @@ var webpack = require('webpack'); module.exports = { cache: true, - entry: path.join(__dirname, '/modules/index.js'), + entry: path.join(__dirname, '/src/index.js'), externals: [ { "react": {