diff --git a/package.json b/package.json index 4680409..fe52724 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,9 @@ "getStaticDirs.d.ts" ], "scripts": { - "build": "node scripts/rm.js dist && tsc --outDir dist/es && babel src --out-dir dist/cjs --extensions '.ts,.tsx'", + "build": "node scripts/rm.js dist && tsc --outDir dist/es && babel src --out-dir dist/cjs --extensions '.ts,.tsx' && node scripts/npmPackDev.js", "format": "prettier src example/src --write", - "start:example": "node scripts/npmPackDev.js && cd example && npm i ../storybook-addon-code-editor-0.0.0.tgz && npm run storybook:dev", + "start:example": "npm run build && cd example && npm i ../storybook-addon-code-editor-0.0.0.tgz && npm run storybook:dev", "test": "jest src" }, "dependencies": { diff --git a/scripts/npmPackDev.js b/scripts/npmPackDev.js index ca29178..c71b6c5 100644 --- a/scripts/npmPackDev.js +++ b/scripts/npmPackDev.js @@ -13,6 +13,6 @@ function exec(command) { } (async () => { - await Promise.all([exec('npm run build'), exec('npm pkg set version=0.0.0')]); + await exec('npm pkg set version=0.0.0'); await exec('npm pack'); })().finally(() => exec(`npm pkg set version=${pkgJson.version}`));