add dev task that writes output to disk
This commit is contained in:
parent
0e4117aaaf
commit
9d1ae91bc7
@ -4,7 +4,9 @@
|
||||
"description": "Netlify CMS lets content editors work on structured content stored in git",
|
||||
"main": "dist/cms.js",
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server -d --config webpack.dev.js",
|
||||
"start": "npm run dev",
|
||||
"dev": "webpack-dev-server -d --config webpack.dev.js",
|
||||
"dev:write": "webpack-dev-server -d --config webpack.dev-write.js",
|
||||
"test": "jest --coverage",
|
||||
"test:watch": "jest --watch",
|
||||
"build": "cross-env NODE_ENV=production webpack --config webpack.prod.js --display-error-details",
|
||||
@ -123,7 +125,8 @@
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-dev-server": "^2.9.1",
|
||||
"webpack-merge": "^4.1.0",
|
||||
"webpack-postcss-tools": "^1.1.1"
|
||||
"webpack-postcss-tools": "^1.1.1",
|
||||
"write-file-webpack-plugin": "^4.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"classnames": "^2.2.5",
|
||||
|
9
webpack.dev-write.js
Normal file
9
webpack.dev-write.js
Normal file
@ -0,0 +1,9 @@
|
||||
/* global require */
|
||||
const merge = require('webpack-merge');
|
||||
const WriteFilePlugin = require('write-file-webpack-plugin');
|
||||
|
||||
module.exports = merge.smart(require('./webpack.dev.js'), {
|
||||
plugins: [
|
||||
new WriteFilePlugin(),
|
||||
],
|
||||
});
|
15
yarn.lock
15
yarn.lock
@ -3164,6 +3164,10 @@ fileset@^2.0.2:
|
||||
glob "^7.0.3"
|
||||
minimatch "^3.0.3"
|
||||
|
||||
filesize@^3.2.1:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.0.tgz#22d079615624bb6fd3c04026120628a41b3f4efa"
|
||||
|
||||
fill-range@^2.1.0:
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
|
||||
@ -9582,6 +9586,17 @@ write-file-stdout@0.0.2:
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/write-file-stdout/-/write-file-stdout-0.0.2.tgz#c252d7c7c5b1b402897630e3453c7bfe690d9ca1"
|
||||
|
||||
write-file-webpack-plugin@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/write-file-webpack-plugin/-/write-file-webpack-plugin-4.2.0.tgz#7bd18547eaa0ea0b23992fb1e0322e5431d339ef"
|
||||
dependencies:
|
||||
chalk "^1.1.1"
|
||||
debug "^2.6.8"
|
||||
filesize "^3.2.1"
|
||||
lodash "^4.5.1"
|
||||
mkdirp "^0.5.1"
|
||||
moment "^2.11.2"
|
||||
|
||||
write@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
|
||||
|
Loading…
x
Reference in New Issue
Block a user