Jigsaw: Build Command

Created on 8 Oct 2018  路  2Comments  路  Source: tighten/jigsaw

Hi there,
Which is the difference between this two command:

./vendor/bin/jigsaw build production && npm run production?

I have deployed a site on Netlify and I'm using a function which is served with netlify-lambda build <folder>.
Now I have to attach this command to the build production. Could you someone help me with that?

The documentation says that you guys use this approach to deploy on Github pages but I can't see anything that explains the difference between this two command.

Maybe there is no different, but I'm new so please be patient.

Most helpful comment

  • ./vendor/bin/jigsaw build production runs Jigsaw's build command to create the production files for your site, but it doesn't run any npm scripts鈥攎eaning if you have any asset compilation steps to run (e.g. running CSS through a pre-processor like Less or Sass, or compiling JS), build will not run those.
  • npm run production runs the production script that's in package.json, which triggers webpack and runs your asset compilation, _as well as_ running ./vendor/bin/jigsaw build.

So:

  • ./vendor/bin/jigsaw build => builds site files only
  • npm run production => processes assets & builds site files

All 2 comments

  • ./vendor/bin/jigsaw build production runs Jigsaw's build command to create the production files for your site, but it doesn't run any npm scripts鈥攎eaning if you have any asset compilation steps to run (e.g. running CSS through a pre-processor like Less or Sass, or compiling JS), build will not run those.
  • npm run production runs the production script that's in package.json, which triggers webpack and runs your asset compilation, _as well as_ running ./vendor/bin/jigsaw build.

So:

  • ./vendor/bin/jigsaw build => builds site files only
  • npm run production => processes assets & builds site files

@damiani thanks for your fast reply.

Now it's more clear to me and very useful too,

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrgodhani picture mrgodhani  路  8Comments

mattstauffer picture mattstauffer  路  3Comments

GenieTim picture GenieTim  路  4Comments

luklus picture luklus  路  11Comments

himan72 picture himan72  路  9Comments