commit e8917cfbab6e0f0e1420facb69c80e413875e3e3
parent f251283e171b0171f61b43417ff7f35420dced28
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Fri, 21 Aug 2015 03:58:20 +0300
Build doesn't include package.json
Fix #228
Diffstat:
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
@@ -45,6 +45,7 @@
"postcss-nested": "^0.3.2",
"psi": "^1.0.6",
"react-hot-loader": "^1.2.8",
+ "replace": "^0.3.0",
"run-sequence": "^1.1.2",
"style-loader": "^0.12.3",
"url-loader": "^0.5.6",
diff --git a/tools/copy.js b/tools/copy.js
@@ -8,6 +8,7 @@
*/
import path from 'path';
+import replace from 'replace';
import copy from './lib/copy';
import watch from './lib/watch';
@@ -25,9 +26,19 @@ export default async () => {
copy('src/content', 'build/content'),
// Website and email templates
- copy('src/templates', 'build/templates')
+ copy('src/templates', 'build/templates'),
+
+ copy('package.json', 'build/package.json')
]);
+ replace({
+ regex: '"start".*',
+ replacement: '"start": "node server.js"',
+ paths: ['build/package.json'],
+ recursive: false,
+ silent: false
+ });
+
if (global.WATCH) {
const watcher = await watch('src/content/**/*.*');
watcher.on('changed', async (file) => {