This package has been deprecated

Author message:

snowpack-start is no longer developed or maintained (and neither is Snowpack). Switching to the actively maintained Vite is recommended.

snowpack-start

2.1.2 • Public • Published

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:

No CLI options

With some CLI options:

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.

Syntax Description
-d, --defaults Use default options
-ld, --load <files...> Load options from files

Active

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

Syntax Description
-bt, --base-template <template> Base template
-ts, --typescript Use TypeScript
-nts, --no-typescript Don't use TypeScript
--t, --testing <testing> Testing
-cdf, --code-formatters <formatters...> Code formatters
-s, --sass Use Sass
-ns, --no-sass Don'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)

Option Valid Values
Base template blank/react/react-redux/vue/svelte/preact/lit-element
Testing wtr/jest/none
Code formatters eslint, prettier, none
CSS framework none/tailwindcss/bootstrap
Bundler webpack/snowpack/none
Other plugins postcss, srs, sbs, none
License mit/gpl/apache/none

Value Plugin
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.

Syntax Description
--use-yarn Use Yarn
--no-use-yarn Don't use Yarn
--use-pnpm Use pnpm
--no-use-pnpm Don't use pnpm
--skip-tailwind-init Skip TailwindCSS init
--no-skip-tailwind-init Don't skip TailwindCSS init
--skip-eslint-init Skip ESLint init
--no-skip-eslint-init Don't skip ESLint init
--skip-git-init Skip git init
--no-skip-git-init Don'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.

Using default options

Loading Options From Files

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

Loading options from files

Order Of Operations

Defaults >> Files >> CLI >> Prompts

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

Overwriting previous 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:

Overwriting previous other deps

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

Package Sidebar

Install

npm i snowpack-start

Weekly Downloads

80

Version

2.1.2

License

MIT

Unpacked Size

326 kB

Total Files

189

Last publish

Collaborators

  • andrew-1135