diff options
author | 2021-04-26 16:54:20 -0500 | |
---|---|---|
committer | 2021-04-26 15:54:20 -0600 | |
commit | dea1a6dfc9dec54034d2b872b4cd36c0174814c6 (patch) | |
tree | 49569a511201b4defc23b6654b475e458452596a /examples/snowpack/src/pages/tutorials/quick-start.md | |
parent | 0ea4a986e207238bf0ac1db841b2a5d5b567d84d (diff) | |
download | astro-dea1a6dfc9dec54034d2b872b4cd36c0174814c6.tar.gz astro-dea1a6dfc9dec54034d2b872b4cd36c0174814c6.tar.zst astro-dea1a6dfc9dec54034d2b872b4cd36c0174814c6.zip |
Update defaults directory structure to `src` and `dist` (#132)
* chore: update defaults in docs
* chore: update config defaults
* test: update tests to config defaults
* chore: update gitignore to new defaults
* docs: update readme to new defaults
* chore: update examples to new defaults
* chore: update default exclude in lang server
* chore: update tests
* test: fix failing tests
* chore: update www defaults
Diffstat (limited to 'examples/snowpack/src/pages/tutorials/quick-start.md')
-rw-r--r-- | examples/snowpack/src/pages/tutorials/quick-start.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/examples/snowpack/src/pages/tutorials/quick-start.md b/examples/snowpack/src/pages/tutorials/quick-start.md new file mode 100644 index 000000000..a3960453f --- /dev/null +++ b/examples/snowpack/src/pages/tutorials/quick-start.md @@ -0,0 +1,61 @@ +--- +layout: ../../layouts/content.astro +title: Quick Start +description: A very basic guide for developers who want to run Snowpack as quickly as possible. +--- + +### Install Snowpack + +```bash +# npm: +npm install --save-dev snowpack +# yarn: +yarn add --dev snowpack +# pnpm: +pnpm add --save-dev snowpack +``` + +### Run the Snowpack CLI + +```bash +npx snowpack [command] +yarn run snowpack [command] +pnpm run snowpack [command] +``` + +Throughout our documentation, we'll use `snowpack [command]` to document the CLI. To run your locally installed version of Snowpack, add the `npx`/`yarn run`/`pnpm run` prefix of the package manager that you used to install Snowpack. + +For long-term development, the best way to use Snowpack is with a package.json script. This reduces your own need to remember exact Snowpack commands/configuration, and lets you share some common scripts with the rest of your team (if applicable). + +```js +// Recommended: package.json scripts +// npm run start (or: "yarn run ...", "pnpm run ...") +"scripts": { + "start": "snowpack dev", + "build": "snowpack build" +} +``` + +### Serve your project locally + +``` +snowpack dev +``` + +This starts the local dev server for development. By default this serves your current working directory to the browser, and will look for an `index.html` file to start. You can customize which directories you want to serve via the ["mount"](/reference/configuration) configuration. + +### Build your project + +``` +snowpack build +``` + +This builds your project into a static `build/` directory that you can deploy anywhere. You can customize your build via [configuration](/reference/configuration). + +### See all commands & options + +``` +snowpack --help +``` + +The `--help` flag will display helpful output. |