Commit 3a3cfda9 by Ari Rizzitano

progress

parent 2a4d30d2
......@@ -11,6 +11,7 @@
"deploy-storybook": "storybook-to-ghpages",
"lint": "eslint --ext .js --ext .jsx .",
"precommit": "npm run lint",
"pretest": "lerna bootstrap",
"snapshot": "jest --updateSnapshot",
"start": "start-storybook -p 6006",
"test": "jest --coverage"
......@@ -61,6 +62,12 @@
"webpack-dev-server": "^2.4.4"
},
"jest": {
"transform": {
"\\.(js|jsx)$": "babel-jest"
},
"moduleDirectories": [
"node_modules"
],
"moduleNameMapper": {
"\\.(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"
......
......@@ -5,8 +5,8 @@
"description": "Accessible button component from edX's Paragon library",
"license": "MIT",
"dependencies": {
"bootstrap": "4.0.0-alpha.6",
"classnames": "^2.2.5",
"edx-bootstrap": "^0.2.1",
"prop-types": "^15.5.8",
"react": "^15.5.4"
}
......
......@@ -6,8 +6,8 @@
"license": "MIT",
"dependencies": {
"@arizzitano/button": "^0.0.2",
"bootstrap": "4.0.0-alpha.6",
"classnames": "^2.2.5",
"edx-bootstrap": "^0.2.1",
"prop-types": "^15.5.8",
"react": "^15.5.4"
}
......
const path = require('path');
const BabiliPlugin = require('babili-webpack-plugin');
const env = process.env.NODE_ENV || 'dev';
const base = {
module.exports = {
devtool: 'source-map',
entry: {
Button: path.resolve('./packages/Button/index.jsx'),
......@@ -63,53 +61,36 @@ 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: [{
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
externals: [{
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react',
},
},
{
'react-dom': {
root: 'ReactDOM',
commonjs2: 'react-dom',
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',
commonjs2: 'react-addons-transition-group',
amd: 'react-addons-transition-group',
root: ['React', 'addons', 'TransitionGroup'],
},
},
{
'react-addons-transition-group': {
commonjs: 'react-addons-transition-group',
commonjs2: 'react-addons-transition-group',
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