improve builds and local development

This commit is contained in:
Shawn Erquhart
2018-07-23 12:30:15 -04:00
parent aac5167461
commit ef90fb9925
22 changed files with 228 additions and 795 deletions

View File

@ -1,3 +0,0 @@
const config = require('../../babel.config.js');
module.exports = config;

View File

@ -13,18 +13,13 @@
"sideEffects": false,
"scripts": {
"watch": "webpack -w",
"build": "cross-env NODE_ENV=production webpack"
"build": "webpack"
},
"dependencies": {
"js-base64": "^2.4.8",
"semaphore": "^1.1.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"cross-env": "^5.2.0",
"rollup": "^0.63.2",
"rollup-plugin-babel": "^4.0.0-beta.7",
"webpack": "^4.16.1",
"webpack-cli": "^3.1.0"
},

View File

@ -1,3 +0,0 @@
const config = require('../../babel.config.js');
module.exports = config;

View File

@ -13,18 +13,13 @@
"sideEffects": false,
"scripts": {
"watch": "webpack -w",
"build": "cross-env NODE_ENV=production webpack"
"build": "webpack"
},
"dependencies": {
"js-base64": "^2.4.8",
"semaphore": "^1.1.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"cross-env": "^5.2.0",
"rollup": "^0.63.2",
"rollup-plugin-babel": "^4.0.0-beta.7",
"webpack": "^4.16.1",
"webpack-cli": "^3.1.0"
},

View File

@ -1,3 +0,0 @@
const config = require('../../babel.config.js');
module.exports = config;

View File

@ -12,17 +12,12 @@
"sideEffects": false,
"scripts": {
"watch": "webpack -w",
"build": "cross-env NODE_ENV=production webpack"
"build": "webpack"
},
"dependencies": {
"uuid": "^3.3.2"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"cross-env": "^5.2.0",
"rollup": "^0.63.2",
"rollup-plugin-babel": "^4.0.0-beta.7",
"webpack": "^4.16.1",
"webpack-cli": "^3.1.0"
},

View File

@ -1,3 +0,0 @@
const config = require('../../babel.config.js');
module.exports = config;

View File

@ -15,8 +15,8 @@
"dist/"
],
"scripts": {
"watch": "cross-env NETLIFY_CMS_VERSION=$npm_package_version webpack-dev-server --hot --open",
"build": "cross-env NETLIFY_CMS_VERSION=$npm_package_version webpack"
"watch": "webpack-dev-server --hot --open",
"build": "webpack"
},
"keywords": [
"netlify",
@ -42,7 +42,7 @@
"jwt-decode": "^2.1.0",
"lib": "^3.0.2",
"localforage": "^1.4.2",
"lodash": "^4.13.1",
"lodash": "^4.17.10",
"mdast-util-definitions": "^1.2.2",
"mdast-util-to-string": "^1.0.4",
"moment": "^2.11.2",
@ -104,11 +104,11 @@
"what-input": "^5.0.3"
},
"devDependencies": {
"@babel/core": "^7.0.0-beta.54",
"babel-loader": "^8.0.0-beta",
"cross-env": "^5.2.0",
"css-loader": "^1.0.0",
"friendly-errors-webpack-plugin": "^1.7.0",
"to-string-loader": "^1.1.5",
"webpack": "^4.16.1",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.4"
"webpack-dev-server": "^3.1.5"
}
}

View File

@ -1,10 +1,12 @@
import React from 'react';
import PropTypes from 'prop-types';
import { css, injectGlobal, cx } from 'react-emotion';
//import 'redux-notifications/lib/styles.css'; // Import default redux-notifications styles into global scope.
import reduxNotificationsStyles from 'redux-notifications/lib/styles.css';
import { shadows, colors, lengths } from 'netlify-cms-ui-default';
injectGlobal`
${reduxNotificationsStyles};
.notif__container {
z-index: 10000;
}

View File

@ -7,8 +7,14 @@ module.exports = {
context: path.join(__dirname, 'src'),
entry: './index.js',
module: {
noParse: /\.css$/,
...baseConfig.module,
rules: [
...baseConfig.module.rules,
{
test: /\.css$/,
include: [/redux-notifications/],
use: ['to-string-loader', 'css-loader'],
},
],
},
devServer: {
contentBase: './example',
@ -18,6 +24,7 @@ module.exports = {
port: 8080,
},
plugins: [
...baseConfig.plugins.filter(plugin => !plugin instanceof FriendlyErrorsWebpackPlugin),
new FriendlyErrorsWebpackPlugin({
compilationSuccessInfo: {
messages: ['Netlify CMS is now running at http://localhost:8080'],

View File

@ -1,3 +0,0 @@
const config = require('../../babel.config.js');
module.exports = config;

View File

@ -13,14 +13,9 @@
"sideEffects": false,
"scripts": {
"watch": "webpack -w",
"build": "cross-env NODE_ENV=production webpack"
"build": "webpack"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"cross-env": "^5.2.0",
"rollup": "^0.63.2",
"rollup-plugin-babel": "^4.0.0-beta.7",
"webpack": "^4.16.1",
"webpack-cli": "^3.1.0"
},

View File

@ -1,3 +0,0 @@
const config = require('../../babel.config.js');
module.exports = config;

View File

@ -14,17 +14,12 @@
"sideEffects": false,
"scripts": {
"watch": "webpack -w",
"build": "cross-env NODE_ENV=production webpack"
"build": "webpack"
},
"dependencies": {
"uuid": "^3.1.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"cross-env": "^5.2.0",
"rollup": "^0.63.2",
"rollup-plugin-babel": "^4.0.0-beta.7",
"webpack": "^4.16.1",
"webpack-cli": "^3.1.0"
},

View File

@ -1,3 +0,0 @@
const config = require('../../babel.config.js');
module.exports = config;

View File

@ -10,17 +10,12 @@
"sideEffects": false,
"scripts": {
"watch": "webpack -w",
"build": "cross-env NODE_ENV=production webpack"
"build": "webpack"
},
"dependencies": {
"localforage": "^1.4.2"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"cross-env": "^5.2.0",
"rollup": "^0.63.2",
"rollup-plugin-babel": "^4.0.0-beta.7",
"webpack": "^4.16.1",
"webpack-cli": "^3.1.0"
},

View File

@ -1,3 +0,0 @@
const config = require('../../babel.config.js');
module.exports = config;

View File

@ -10,7 +10,7 @@
"sideEffects": false,
"scripts": {
"watch": "webpack -w",
"build": "cross-env NODE_ENV=production webpack"
"build": "webpack"
},
"dependencies": {
"react-aria-menubutton": "^5.1.0",
@ -18,11 +18,6 @@
"react-transition-group": "^2.2.1"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.54",
"@babel/core": "^7.0.0-beta.54",
"cross-env": "^5.2.0",
"rollup": "^0.63.2",
"rollup-plugin-babel": "^4.0.0-beta.7",
"webpack": "^4.16.1",
"webpack-cli": "^3.1.0"
},