Commit 3a3cfda9 by Ari Rizzitano

progress

parent 2a4d30d2
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"deploy-storybook": "storybook-to-ghpages", "deploy-storybook": "storybook-to-ghpages",
"lint": "eslint --ext .js --ext .jsx .", "lint": "eslint --ext .js --ext .jsx .",
"precommit": "npm run lint", "precommit": "npm run lint",
"pretest": "lerna bootstrap",
"snapshot": "jest --updateSnapshot", "snapshot": "jest --updateSnapshot",
"start": "start-storybook -p 6006", "start": "start-storybook -p 6006",
"test": "jest --coverage" "test": "jest --coverage"
...@@ -61,6 +62,12 @@ ...@@ -61,6 +62,12 @@
"webpack-dev-server": "^2.4.4" "webpack-dev-server": "^2.4.4"
}, },
"jest": { "jest": {
"transform": {
"\\.(js|jsx)$": "babel-jest"
},
"moduleDirectories": [
"node_modules"
],
"moduleNameMapper": { "moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js", "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|scss)$": "identity-obj-proxy" "\\.(css|scss)$": "identity-obj-proxy"
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"description": "Accessible button component from edX's Paragon library", "description": "Accessible button component from edX's Paragon library",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"bootstrap": "4.0.0-alpha.6",
"classnames": "^2.2.5", "classnames": "^2.2.5",
"edx-bootstrap": "^0.2.1",
"prop-types": "^15.5.8", "prop-types": "^15.5.8",
"react": "^15.5.4" "react": "^15.5.4"
} }
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@arizzitano/button": "^0.0.2", "@arizzitano/button": "^0.0.2",
"bootstrap": "4.0.0-alpha.6",
"classnames": "^2.2.5", "classnames": "^2.2.5",
"edx-bootstrap": "^0.2.1",
"prop-types": "^15.5.8", "prop-types": "^15.5.8",
"react": "^15.5.4" "react": "^15.5.4"
} }
......
const path = require('path'); const path = require('path');
const BabiliPlugin = require('babili-webpack-plugin'); const BabiliPlugin = require('babili-webpack-plugin');
const env = process.env.NODE_ENV || 'dev'; module.exports = {
const base = {
devtool: 'source-map', devtool: 'source-map',
entry: { entry: {
Button: path.resolve('./packages/Button/index.jsx'), Button: path.resolve('./packages/Button/index.jsx'),
...@@ -63,20 +61,6 @@ const base = { ...@@ -63,20 +61,6 @@ const base = {
}, },
], ],
}, },
};
const additionalConfig = {
// production builds the library for external consumption
production: {
entry: {
Dropdown: path.resolve('./src/Dropdown.jsx'),
},
output: {
path: path.resolve('./dist'),
filename: '[name].js',
library: 'paragon',
libraryTarget: 'umd',
},
externals: [{ externals: [{
react: { react: {
root: 'React', root: 'React',
...@@ -109,7 +93,4 @@ const additionalConfig = { ...@@ -109,7 +93,4 @@ const additionalConfig = {
root: ['React', 'addons', 'CSSTransitionGroup'], root: ['React', 'addons', 'CSSTransitionGroup'],
}, },
}], }],
},
}; };
module.exports = Object.assign(base, additionalConfig[env]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment