2.1.2 • Published 2 years ago

snowpack-start v2.1.2

Weekly downloads
93
License
MIT
Repository
github
Last release
2 years ago

snowpack-start

⛔ DEPRECATED ⛔

snowpack-start is no longer developed or maintained (and neither is Snowpack).

Switching to the actively maintained Vite is recommended.

What is Snowpack?

Snowpack is a lightning-fast frontend build tool, designed for the modern web. It is an alternative to heavier, more complex bundlers like webpack or Parcel in your development workflow.

The problem: manually customizing templates from create-snowpack-app was annoying.

The solution: snowpack-start (snowpack-init was already taken). snowpack-start installs packages and generates configuration boilerplate so you can get to developing faster.

Usage

Node version ≥ 10 is required.

$ npx snowpack-start [project-directory] [other-options]

All CLI options (including project directory) are optional.

With no CLI options:

With some CLI options:

Using all CLI options and skipping prompts entirely is also possible.

CLI Options

CLI only

These can only be used on the command line.

SyntaxDescription
-d, --defaultsUse default options
-ld, --load <files...>Load options from files

Active

Prompts will be displayed for active options not otherwise provided on the command line.

SyntaxDescription
-bt, --base-template <template>Base template
-ts, --typescriptUse TypeScript
-nts, --no-typescriptDon't use TypeScript
--t, --testing <testing>Testing
-cdf, --code-formatters <formatters...>Code formatters
-s, --sassUse Sass
-ns, --no-sassDon't use Sass
-cssf, --css-framework <framework>CSS framework
-b, --bundler <bundler>Bundler
-p, --plugins <plugins...>Other plugins
-opd, --other-prod-deps <deps...>Other prod dependencies
-odd, --other-dev-deps <deps...>Other dev dependencies
-lc, --license <license>License
-a, --author <author>Author (for MIT license)
OptionValid Values
Base templateblank/react/react-redux/vue/svelte/preact/lit-element
Testingwtr/jest/none
Code formatterseslint, prettier, none
CSS frameworknone/tailwindcss/bootstrap
Bundlerwebpack/snowpack/none
Other pluginspostcss, srs, sbs, none
Licensemit/gpl/apache/none
ValuePlugin
postcss@snowpack/plugin-postcss
srs@snowpack/plugin-run-script
sbs@snowpack/plugin-build-script

⚠️ Don't install @snowpack/plugin-run-script or @snowpack/plugin-build-script unless you have a reason to! They're not required to run Snowpack and are for additional processing that isn't already handled by existing plugins.

Passive

Passive options do not have prompts.

SyntaxDescription
--use-yarnUse Yarn
--no-use-yarnDon't use Yarn
--use-pnpmUse pnpm
--no-use-pnpmDon't use pnpm
--skip-tailwind-initSkip TailwindCSS init
--no-skip-tailwind-initDon't skip TailwindCSS init
--skip-eslint-initSkip ESLint init
--no-skip-eslint-initDon't skip ESLint init
--skip-git-initSkip git init
--no-skip-git-initDon't skip git init

Default Options

On startup, snowpack-start will look for a .snowpackstart.js file in the home directory. If it exists, then the options in that file are loaded as default options. Otherwise, the built-in default options are used.

Passive defaults will always be applied regardless of whether the defaults flag has been passed on the command line. Active defaults will only be applied if -d or --defaults has been passed. If not applied, active defaults will be set as the initial selections/values of their corresponding prompts.

Loading Options From Files

Specify paths to files (extension optional), and options will be loaded from them:

Order Of Operations

Defaults >> Files >> CLI >> Prompts

Later options overwrite earlier ones, with the exception of the other deps options:

The other deps options are instead additive, so later deps will be added to the existing deps. To clear previous deps, use none in files or CLI:

Issues

Known

  • Jest configs for Snowpack are only available for React, Preact (JS+TS) and Svelte (JS only), and do not yet support Jest 27.
  • eslint --init only supports React and Vue, additional setup required for Svelte, Preact, and LitElement.
  • eslint --init only installs packages with npm, no option to use Yarn or pnpm.
  • Starting with Snowpack v3.1 and as of v3.8.8, image/JSON imports break builds using the built-in bundler (#3109). A workaround is automatically added if snowpack is selected as the bundler.

Acknowledgements

Portions of code have been adapted from create-snowpack-app and create-react-app.

Official app templates from create-snowpack-app, with configurations from community templates used.

React-Redux templates adapted from create-react-app.

License

MIT

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago

1.0.0-beta.6

3 years ago

1.0.0-beta.7

3 years ago

1.0.0-beta.5

3 years ago

1.0.0-beta.4

3 years ago

1.0.0-beta.3

3 years ago

1.0.0-beta.2

3 years ago

1.0.0-beta.1

3 years ago

1.0.0-beta.0

3 years ago