1.24.7 • Published 5 months ago

@crasman/create-stage-webpack v1.24.7

Weekly downloads
27
License
-
Repository
-
Last release
5 months ago

@crasman/create-stage-webpack

CRA (Create React App) inspired setup script for setting up project that supports React and Vue frameworks out of the box with Stage / Studio environments in mind.

studio-project-generator vs @crasman/stage-webpack: differences / breaking changes

  • @crasman/stage-webpack only bundles assets that are referenced within files (e.g. icons) and hashes the output filename for better long time cache. If you need to reference some icons / images from Stage, you need to place these files inside the static folder that is uploaded as is, without optimization
  • Webpack favors the ES6 import / export because that allows tree-shaking (getting rid of code that isn't referenced). module.exports doesn't break anything but for more efficient bundling, it's better to use import & export
  • Be prepared for lots of CSS / SCSS related lint errors / warnings. Linter changed from sass-lint to stylelint to allow fix operation during build and with editor's stylelint plugin. fix and lint scripts are added to package.json to help this transition.

Setup project

  1. Prepare to answers to the following questions, which will be asked while the new project is being setup:

    • Studio ID
    • Folder ID of the Studio folder, that we will be uploading in to
    • Path to that folder on Studio (for example: web/v1/)
    • Site's admin url
    • Site's public url
    • Project ID (Used for compiled js and css file names)
    • Indentation style: 2 or 4 spaces, or tabs.

These settings (except indentation style) can be later found and edited at stage-webpack.config.js if any of these change or haven't been decided yet.

  1. run npx @crasman/create-stage-webpack <target-folder> or yarn create @crasman/stage-webpack <target-folder> to setup new project / update existing project created with studio-project-generator.
  2. Go to newly created / updated directory

If new project

  1. Install dependencies
  2. Setup git
  3. Read project's README.md for available commands and useful editor plugins

If updating studio-project-generator project

  1. Delete package-lock.json / yarn.lock & node_modules
  2. Install dependencies
  3. Try to run the lint / fix commands defined in the project's README.md. Prepare for lots of CSS related errors as the linter has changed from sass-lint to stylelint
  4. Delete gulp folder when ready with setup

Setup branch helper

See branch-helper.md to learn how to add branch support to Stage.

1.24.7

5 months ago

1.24.6-alpha.0

5 months ago

1.24.5

6 months ago

1.23.0

2 years ago

1.20.0-alpha.8

2 years ago

1.20.0-alpha.5

2 years ago

1.21.0

2 years ago

1.22.0

2 years ago

1.20.0-alpha.3

2 years ago

1.20.0

2 years ago

1.21.0-alpha.0

2 years ago

1.18.0

3 years ago

1.17.0

3 years ago

1.15.3

3 years ago

1.15.0

3 years ago

1.14.1

3 years ago

1.14.0

3 years ago

1.10.1

4 years ago

1.9.0

4 years ago

1.7.0

4 years ago

1.6.2

4 years ago

1.6.1

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago