Compare commits

...

10 Commits

Author SHA1 Message Date
Conduitry
4e3a4089b4 readme: mention sirv --host 2019-09-23 22:52:24 -04:00
Roman Karavia
6a0e854bd0 Fix charset
UTF-8 needs to have a dash, see e.g. the example
[here](https://www.w3.org/TR/html50/document-metadata.html#character-encoding-declaration).

The current value of `utf8` does not work with Internet Explorer 11. I guess most other browsers
will default to UTF-8 anyway when they encounter an unknown charset value.
2019-09-15 12:13:44 -04:00
MatyiFKBT
acf40fd181 Update README.md
now deployment should be from the public folder, just like surge
2019-07-16 05:26:47 -04:00
Conduitry
cf3acc2a56 use <script defer> 2019-07-12 10:38:41 -04:00
Conduitry
709fd1c9fd dedupe svelte package 2019-07-09 10:12:27 -04:00
Rich Harris
10adbb48bf Merge pull request #51 from PaulBGD/style-button-font
Style button font for browsers using OS dark theme
2019-06-27 22:42:41 -04:00
Paul Sauve
04b253a119 Update global.css 2019-06-25 16:03:31 -05:00
Rich Harris
86495b4e30 Merge pull request #46 from sveltejs/chore/sirv
Chore: Solve FAQ/troubles w/ `sirv-cli` usage
2019-06-16 20:34:59 -04:00
Luke Edwards
fcb39a7ad2 chore: move sirv-cli to dependencies;
- Closes #44
- Closes #45
2019-06-12 09:48:43 -07:00
Luke Edwards
710c36b036 chore: add --single flag & update pathing;
- especially annoying for nested routes
- leaving root-relative is less common case
- Closes #31
2019-06-12 09:47:18 -07:00
5 changed files with 24 additions and 14 deletions

View File

@@ -33,6 +33,8 @@ npm run dev
Navigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes. Navigate to [localhost:5000](http://localhost:5000). You should see your app running. Edit a component file in `src`, save it, and reload the page to see your changes.
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the `sirv` commands in package.json to include the option `--host 0.0.0.0`.
## Deploying to the web ## Deploying to the web
@@ -47,6 +49,7 @@ npm install -g now
Then, from within your project folder: Then, from within your project folder:
```bash ```bash
cd public
now now
``` ```

View File

@@ -3,20 +3,22 @@
"version": "1.0.0", "version": "1.0.0",
"devDependencies": { "devDependencies": {
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"rollup": "^1.10.1", "rollup": "^1.12.0",
"rollup-plugin-commonjs": "^9.3.4", "rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-livereload": "^1.0.0", "rollup-plugin-livereload": "^1.0.0",
"rollup-plugin-node-resolve": "^4.2.3", "rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-svelte": "^5.0.3", "rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^4.0.4", "rollup-plugin-terser": "^4.0.4",
"sirv-cli": "^0.4.0",
"svelte": "^3.0.0" "svelte": "^3.0.0"
}, },
"dependencies": {
"sirv-cli": "^0.4.4"
},
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",
"autobuild": "rollup -c -w", "autobuild": "rollup -c -w",
"dev": "run-p start:dev autobuild", "dev": "run-p start:dev autobuild",
"start": "sirv public", "start": "sirv public --single",
"start:dev": "sirv public --dev" "start:dev": "sirv public --single --dev"
} }
} }

View File

@@ -48,6 +48,7 @@ input[type="range"] {
} }
button { button {
color: #333;
background-color: #f4f4f4; background-color: #f4f4f4;
outline: none; outline: none;
} }
@@ -58,4 +59,4 @@ button:active {
button:focus { button:focus {
border-color: #666; border-color: #666;
} }

View File

@@ -1,17 +1,18 @@
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta charset='utf8'> <meta charset='utf-8'>
<meta name='viewport' content='width=device-width'> <meta name='viewport' content='width=device-width'>
<title>Svelte app</title> <title>Svelte app</title>
<link rel='icon' type='image/png' href='favicon.png'> <link rel='icon' type='image/png' href='/favicon.png'>
<link rel='stylesheet' href='global.css'> <link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='bundle.css'> <link rel='stylesheet' href='/bundle.css'>
<script defer src='/bundle.js'></script>
</head> </head>
<body> <body>
<script src='bundle.js'></script>
</body> </body>
</html> </html>

View File

@@ -30,7 +30,10 @@ export default {
// some cases you'll need additional configuration — // some cases you'll need additional configuration —
// consult the documentation for details: // consult the documentation for details:
// https://github.com/rollup/rollup-plugin-commonjs // https://github.com/rollup/rollup-plugin-commonjs
resolve({ browser: true }), resolve({
browser: true,
dedupe: importee => importee === 'svelte' || importee.startsWith('svelte/')
}),
commonjs(), commonjs(),
// Watch the `public` directory and refresh the // Watch the `public` directory and refresh the