Skip to content

Commit

Permalink
Remove only static dir (storybookjs#1618)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi authored Aug 10, 2017
1 parent 1e2855c commit a023599
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ docs/public
packs/*.tgz
package-lock.json
.nvmrc
storybook-static
5 changes: 3 additions & 2 deletions app/react/src/server/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ getEnvConfig(program, {
const configDir = program.configDir || './.storybook';
const outputDir = program.outputDir || './storybook-static';

// create output directory (and the static dir) if not exists
shelljs.rm('-rf', outputDir);
// create output directory if not exists
shelljs.mkdir('-p', path.resolve(outputDir));
// clear the static dir
shelljs.rm('-rf', path.resolve(outputDir, 'static'));
shelljs.cp(path.resolve(__dirname, 'public/favicon.ico'), outputDir);

// Build the webpack configuration using the `baseConfig`
Expand Down
5 changes: 3 additions & 2 deletions app/vue/src/server/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ getEnvConfig(program, {
const configDir = program.configDir || './.storybook';
const outputDir = program.outputDir || './storybook-static';

// create output directory (and the static dir) if not exists
shelljs.rm('-rf', outputDir);
// create output directory if not exists
shelljs.mkdir('-p', path.resolve(outputDir));
// clear the static dir
shelljs.rm('-rf', path.resolve(outputDir, 'static'));
shelljs.cp(path.resolve(__dirname, 'public/favicon.ico'), outputDir);

// Build the webpack configuration using the `baseConfig`
Expand Down

0 comments on commit a023599

Please sign in to comment.