1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-01 04:50:27 +02:00

Set up webpack configuration for building examples (#1642)

* Set up webpack configuration for building examples

* Configure react-hot-loader in development

* Improve config, set gh-pages to use examples/dist directory

* PR feedback

* Rename App.js in git
This commit is contained in:
Zach Schneider
2018-02-21 20:19:56 -05:00
committed by Ian Storm Taylor
parent 670ef391a8
commit 2ebf3b462b
14 changed files with 3385 additions and 508 deletions

View File

@@ -4,11 +4,10 @@
"workspaces": [
"packages/*"
],
"umd": "./examples/build.dev.js",
"umdMin": "./examples/build.prod.js",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.1",
"babel-loader": "^7.1.2",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
@@ -16,18 +15,23 @@
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"chalk": "^1.1.3",
"clean-webpack-plugin": "^0.1.18",
"copy-webpack-plugin": "^4.4.1",
"cross-env": "^5.1.3",
"css-loader": "^0.28.9",
"disc": "^1.3.2",
"eslint": "^4.16.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-prettier": "^2.5.0",
"eslint-plugin-react": "^7.6.0",
"extract-text-webpack-plugin": "^3.0.2",
"faker": "^3.1.0",
"fbjs": "^0.8.3",
"fs-promise": "^1.0.0",
"gh-pages": "^0.11.0",
"http-server": "^0.9.0",
"html-webpack-plugin": "^2.30.1",
"html-webpack-template": "^6.1.0",
"image-extensions": "^1.1.0",
"immutable": "^3.8.1",
"is-hotkey": "^0.1.1",
@@ -37,13 +41,14 @@
"lodash": "^4.17.4",
"matcha": "^0.7.0",
"mocha": "^2.5.3",
"npm-run-all": "^4.1.1",
"npm-run-all": "^4.1.2",
"prettier": "^1.10.2",
"prismjs": "^1.5.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-frame-aware-selection-plugin": "^1.0.0",
"react-frame-component": "^1.1.1",
"react-hot-loader": "^3.1.3",
"react-portal": "^3.1.0",
"react-router": "^2.5.1",
"react-router-dom": "^4.1.1",
@@ -64,8 +69,12 @@
"slate-soft-break": "^0.6.0",
"slate-sugar": "^0.6.1",
"source-map-support": "^0.4.0",
"style-loader": "^0.20.2",
"to-camel-case": "^1.0.0",
"to-title-case": "^1.0.0",
"uglifyjs-webpack-plugin": "^1.1.8",
"webpack": "^3.11.0",
"webpack-dev-server": "^2.11.1",
"yaml-js": "^0.2.0"
},
"peerDependencies": {
@@ -80,13 +89,14 @@
"benchmark:save": "mkdir -p ./tmp && cross-env BABEL_ENV=test babel-node ./node_modules/.bin/_matcha --reporter ./support/benchmark/reporter ./packages/*/benchmark/index.js > ./tmp/benchmark-baseline.json",
"bootstrap": "lerna bootstrap && yarn build",
"build": "rollup --config",
"clean": "lerna run clean && rm -rf ./node_modules ./dist ./examples/build.*.js",
"gh-pages": "cross-env NODE_ENV=production yarn build && gh-pages --dist ./examples",
"build:gh": "cross-env NODE_ENV=production rollup --config && cross-env NODE_ENV=production webpack --config support/webpack.config.js",
"clean": "lerna run clean && rm -rf ./node_modules ./dist ./examples/dist",
"gh-pages": "yarn build:gh && gh-pages --dist ./examples/dist",
"lint": "eslint packages/*/src packages/*/test examples/*/*.js examples/dev/*/*.js && prettier --list-different '**/*.{js,jsx,md,json,css}'",
"open": "open http://localhost:8080/dev.html",
"open": "open http://localhost:8080",
"prettier": "prettier --write '**/*.{js,jsx,md,json,css}'",
"release": "yarn test && yarn lint && lerna publish && yarn gh-pages",
"server": "http-server ./examples",
"server": "webpack-dev-server --config support/webpack.config.js",
"start": "npm-run-all --parallel --print-label watch server",
"test": "cross-env BABEL_ENV=test mocha --require babel-core/register ./packages/*/test/index.js",
"watch": "rollup --config --watch"