Skip to content

Commit 5f1018a

Browse files
author
Ives van Hoorne
committed
Add prepublish script
1 parent 2618dad commit 5f1018a

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

packages/app/config/webpack.common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ module.exports = {
256256
new HtmlWebpackPlugin({
257257
inject: true,
258258
chunks: ['sandbox-startup', 'sandbox'],
259-
filename: 'frame.html',
259+
filename: 'index.html',
260260
template: paths.sandboxHtml,
261261
minify: __PROD__ && {
262262
removeComments: true,

packages/sandpack/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ compiled
22
storybook-static
33
.rpt2_cache
44
dist
5-
docs
5+
docs
6+
sandpack/

packages/sandpack/gulpfile.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const gulp = require('gulp');
2+
3+
gulp.task('copy-sandbox', () =>
4+
gulp.src('../app/www/**/*.*').pipe(gulp.dest('./sandpack/'))
5+
);

packages/sandpack/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"commit": "git-cz",
3030
"semantic-release": "semantic-release",
3131
"semantic-release-prepare": "ts-node tools/semantic-release-prepare",
32-
"precommit": "lint-staged"
32+
"precommit": "lint-staged",
33+
"prepublishOnly": "lerna run build:sandbox --scope app --stream && rimraf sandpack && gulp copy-sandbox"
3334
},
3435
"lint-staged": {
3536
"{src,test}/**/*.ts": [
@@ -83,14 +84,15 @@
8384
"coveralls": "^3.0.0",
8485
"cross-env": "^5.0.1",
8586
"cz-conventional-changelog": "^2.0.0",
87+
"gulp": "^3.9.1",
8688
"husky": "^0.14.0",
8789
"jest": "^22.0.2",
8890
"lint-staged": "^7.0.0",
8991
"lodash.camelcase": "^4.3.0",
9092
"prettier": "^1.4.4",
9193
"prompt": "^1.0.0",
9294
"replace-in-file": "^3.0.0-beta.2",
93-
"rimraf": "^2.6.1",
95+
"rimraf": "^2.6.2",
9496
"rollup": "^0.55.4",
9597
"rollup-plugin-commonjs": "^8.0.2",
9698
"rollup-plugin-node-resolve": "^3.0.0",

0 commit comments

Comments
 (0)