mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
walk-back examples/snowpack changes
This commit is contained in:
parent
e66872125d
commit
472c0e5ac7
7 changed files with 11 additions and 12 deletions
|
@ -27,7 +27,7 @@ npm install
|
|||
3. Run the Astro dev environment.
|
||||
|
||||
```shell
|
||||
npm run dev
|
||||
npm start
|
||||
```
|
||||
|
||||
4. Build the website. (Not yet working.)
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
"build": "astro build",
|
||||
"test": "jest /__test__/",
|
||||
|
|
|
@ -12,7 +12,7 @@ This guide has an example repo:
|
|||
</div>
|
||||
|
||||
```
|
||||
npm run dev -- --secure
|
||||
npm start -- --secure
|
||||
```
|
||||
|
||||
Snowpack provides an easy way to use a local HTTPS server during development through the use of the `--secure` flag. When enabled, Snowpack will look for a `snowpack.key` and `snowpack.crt` file in the root directory and use that to create an HTTPS server with HTTP2 support enabled.
|
||||
|
|
|
@ -71,7 +71,7 @@ Add the Snowpack development server to `package.json` under as the `start` scrip
|
|||
|
||||
```diff
|
||||
"scripts": {
|
||||
+ "dev": "snowpack dev",
|
||||
+ "start": "snowpack dev",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
|
||||
|
@ -80,7 +80,7 @@ Add the Snowpack development server to `package.json` under as the `start` scrip
|
|||
Run the following on the command line to start the Snowpack development server
|
||||
|
||||
```
|
||||
npm run dev
|
||||
npm start
|
||||
```
|
||||
|
||||
If all went well, Snowpack automatically opens your site in a new browser!
|
||||
|
@ -205,7 +205,7 @@ Add the `snowpack build` command to package.json so it's easier to run on the co
|
|||
|
||||
```diff
|
||||
"scripts": {
|
||||
"dev": "snowpack dev",
|
||||
"start": "snowpack dev",
|
||||
+ "build": "snowpack build",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ For long-term development, the best way to use Snowpack is with a package.json s
|
|||
|
||||
```js
|
||||
// Recommended: package.json scripts
|
||||
// npm run dev (or: "yarn run ...", "pnpm run ...")
|
||||
// npm start (or: "yarn run ...", "pnpm run ...")
|
||||
"scripts": {
|
||||
"dev": "snowpack dev",
|
||||
"start": "snowpack dev",
|
||||
"build": "snowpack build"
|
||||
}
|
||||
```
|
||||
|
|
|
@ -36,7 +36,7 @@ You can now head to the new directory and start Snowpack with the following two
|
|||
|
||||
```bash
|
||||
cd react-snowpack
|
||||
npm run dev
|
||||
npm start
|
||||
```
|
||||
|
||||
You should see your new website up and running!
|
||||
|
|
|
@ -39,7 +39,7 @@ Head to the new `svelte-snowpack` directory and start Snowpack with the followin
|
|||
|
||||
```bash
|
||||
cd svelte-snowpack
|
||||
npm run dev
|
||||
npm start
|
||||
```
|
||||
|
||||
You should see your new website up and running!
|
||||
|
@ -75,7 +75,7 @@ module.exports = {
|
|||
],
|
||||
```
|
||||
|
||||
Restart your Snowpack dev server to run it with the new configuration. Exit the process (ctrl + c in most Windows/Linux/macOS) and start it again with `npm run dev`.
|
||||
Restart your Snowpack dev server to run it with the new configuration. Exit the process (ctrl + c in most Windows/Linux/macOS) and start it again with `npm start`.
|
||||
|
||||
> 💡 Tip: Restart the Snowpack development server when you make configuration changes (changes to the `snowpack.config.js`).
|
||||
|
||||
|
@ -192,7 +192,7 @@ The `mount` configuration changes where Snowpack scan for and builds files. Head
|
|||
</body>
|
||||
```
|
||||
|
||||
You'll need to restart Snowpack (stop the process in terminal and then run `npm run dev` again) for configuration file changes. It should look exactly as it did before, but now using your brand new project folder layout
|
||||
You'll need to restart Snowpack (stop the process in terminal and then run `npm start` again) for configuration file changes. It should look exactly as it did before, but now using your brand new project folder layout
|
||||
|
||||
## Adding an animated Svelte Logo
|
||||
|
||||
|
|
Loading…
Reference in a new issue