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,53 +61,36 @@ const base = { ...@@ -63,53 +61,36 @@ const base = {
}, },
], ],
}, },
}; externals: [{
react: {
const additionalConfig = { root: 'React',
// production builds the library for external consumption commonjs2: 'react',
production: { commonjs: 'react',
entry: { amd: 'react',
Dropdown: path.resolve('./src/Dropdown.jsx'),
},
output: {
path: path.resolve('./dist'),
filename: '[name].js',
library: 'paragon',
libraryTarget: 'umd',
}, },
externals: [{ },
react: { {
root: 'React', 'react-dom': {
commonjs2: 'react', root: 'ReactDOM',
commonjs: 'react', commonjs2: 'react-dom',
amd: 'react', commonjs: 'react-dom',
}, amd: 'react-dom',
},
{
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
commonjs: 'react-dom',
amd: 'react-dom',
},
}, },
{ },
'react-addons-transition-group': { {
commonjs: 'react-addons-transition-group', 'react-addons-transition-group': {
commonjs2: 'react-addons-transition-group', commonjs: 'react-addons-transition-group',
amd: 'react-addons-transition-group', commonjs2: 'react-addons-transition-group',
root: ['React', 'addons', 'TransitionGroup'], amd: 'react-addons-transition-group',
}, root: ['React', 'addons', 'TransitionGroup'],
}, },
{
'react-addons-css-transition-group': {
commonjs: 'react-addons-css-transition-group',
commonjs2: 'react-addons-css-transition-group',
amd: 'react-addons-css-transition-group',
root: ['React', 'addons', 'CSSTransitionGroup'],
},
}],
}, },
{
'react-addons-css-transition-group': {
commonjs: 'react-addons-css-transition-group',
commonjs2: 'react-addons-css-transition-group',
amd: 'react-addons-css-transition-group',
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