Commit a0212917 by Ari Rizzitano

move some things around

parent 9cc6f414
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"jest": true "jest": true
}, },
"overrides": { "overrides": {
"files": ["*.stories.jsx", "*.test.jsx"], "files": ["*.stories.jsx", "*.test.jsx", "config/*"],
"rules": { "rules": {
"import/no-extraneous-dependencies": "off" // storybook & enzyme should stay devDependencies "import/no-extraneous-dependencies": "off" // storybook & enzyme should stay devDependencies
} }
......
const path = require('path'); const path = require('path');
const merge = require('webpack-merge'); const merge = require('webpack-merge');
const MinifyPlugin = require('babel-minify-webpack-plugin'); const MinifyPlugin = require('babel-minify-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const scopedConfig = { const scopedConfig = require('./webpack.scoped.config');
output: {
filename: 'dist/index.js',
library: 'paragon',
libraryTarget: 'umd',
},
plugins: [
new ExtractTextPlugin('dist/paragon.min.css'),
],
module: {
rules: [
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
use: [
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]___[hash:base64:5]',
},
},
{
loader: 'sass-loader',
options: {
data: '@import "paragon-reset";',
includePaths: [
path.join(__dirname, './src/utils'),
path.join(__dirname, './node_modules'),
],
},
},
],
}),
},
],
},
};
const commonConfig = { const commonConfig = {
devtool: 'source-map', devtool: 'cheap-source-map',
entry: { entry: {
main: path.resolve('./src/index.js'), paragon: path.resolve('./src/index.js'),
}, },
resolve: { resolve: {
extensions: ['.js', '.jsx'], extensions: ['.js', '.jsx'],
......
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
output: {
filename: 'scoped/[name].min.js',
library: 'paragon',
libraryTarget: 'umd',
},
plugins: [
new ExtractTextPlugin('scoped/paragon.min.css'),
],
module: {
rules: [
{
test: /\.scss|\.css$/,
use: ExtractTextPlugin.extract({
use: [
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[name]__[local]___[hash:base64:5]',
sourceMap: true,
},
},
{
loader: 'sass-loader',
options: {
data: '@import "paragon-reset";',
includePaths: [
path.join(__dirname, '../src/utils'),
path.join(__dirname, '../node_modules'),
],
sourceMap: true,
},
},
],
}),
},
{
test: /\.(woff2?|ttf|svg|eot)(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader',
options: {
outputPath: 'scoped/',
},
},
],
},
};
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
output: {
filename: 'dist/paragon.min.js',
library: 'paragon',
libraryTarget: 'umd',
},
plugins: [
new ExtractTextPlugin('dist/paragon.min.css'),
],
module: {
rules: [
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
use: [
{
loader: 'css-loader',
options: {
modules: true,
localIdentName: '[local]',
},
},
// {
// loader: 'sass-loader',
// options: {
// data: '@import "paragon-reset";',
// includePaths: [
// path.join(__dirname, './src/utils'),
// path.join(__dirname, './node_modules'),
// ],
// },
// },
],
}),
},
],
},
};
...@@ -3,14 +3,13 @@ ...@@ -3,14 +3,13 @@
"version": "0.0.0-development", "version": "0.0.0-development",
"description": "Accessible, responsive UI component library based on Bootstrap.", "description": "Accessible, responsive UI component library based on Bootstrap.",
"main": "src/index.js", "main": "src/index.js",
"author": "arizzitano",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/edx/paragon.git" "url": "https://github.com/edx/paragon.git"
}, },
"scripts": { "scripts": {
"build": "NODE_ENV=production webpack", "build": "NODE_ENV=production webpack --config config/webpack.config.js",
"build-storybook": "build-storybook", "build-storybook": "build-storybook",
"coveralls": "cat ./coverage/lcov.info | coveralls", "coveralls": "cat ./coverage/lcov.info | coveralls",
"debug-test": "node --inspect-brk node_modules/.bin/jest --runInBand --coverage", "debug-test": "node --inspect-brk node_modules/.bin/jest --runInBand --coverage",
......
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