Closed zivbk1 closed 6 years ago
@zivbk1 that should be npm run build
.
create-static-site
aliases the internal scripts to NPM commands.
npm start
is just an alias for npm run start
OK, @chrisdmacrae should I make a pull request for that change to line 187 in init.js?
I assume it should be changed to:
console.log(` ${chalk.cyan(`${displayedCommand} run build`)}`)
@zivbk1 Yes please, because @ncphillips will have to re-publish the package!
@zivbk1 that's not quite the change we would be looking for in this case. The convention of yarn is to not use run
. Instead it would look something like:
console.log(chalk.cyan(` ${displayedCommand} ${useYarn ? "" : "run "}build`))
As seen a few lines up
Open the PR and I'll attach it to the 0.1.2 release of static-scripts
this issue will be closed by #41
The init script tells the user to run
npm build
https://github.com/forestryio/create-static-site/blob/43c3eaf5a003e8ffd640746e3bd93a90d5ad3cc9/packages/static-scripts/scripts/init.js#L187If you look at the ReadMe file, there is information about
npm start
andnpm build
. https://github.com/forestryio/create-static-site/blob/master/README.md#npm-start-or-yarn-startIf I run npm build, nothing happens and I get the following warning in return.
npm WARN build 'npm build' called with no arguments. Did you mean to 'npm run-script build'?
If I run npm start, then the system builds and hosts the site as expected.
I would recommend changing line 187 linked above to
npm start
instead of build, or add the missing parameters that seem to be required to run the build process.