Merge pull request #20 from sveltejs/v3

V3
This commit is contained in:
Rich Harris 2019-04-21 09:13:08 -04:00 committed by GitHub
commit 22d9858b59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 13 deletions

View file

@ -3,13 +3,13 @@
"version": "1.0.0", "version": "1.0.0",
"devDependencies": { "devDependencies": {
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"rollup": "^1.2.2", "rollup": "^1.10.1",
"rollup-plugin-commonjs": "^9.2.0", "rollup-plugin-commonjs": "^9.3.4",
"rollup-plugin-node-resolve": "^4.0.1", "rollup-plugin-node-resolve": "^4.2.3",
"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.2.3", "sirv-cli": "^0.3.1",
"svelte": "^2.16.1" "svelte": "^3.0.0"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",

View file

@ -15,10 +15,6 @@ export default {
}, },
plugins: [ plugins: [
svelte({ svelte({
// opt in to v3 behaviour today
skipIntroByDefault: true,
nestedTransitions: true,
// enable run-time checks when not in production // enable run-time checks when not in production
dev: !production, dev: !production,
// we'll extract any component CSS out into // we'll extract any component CSS out into

View file

@ -1,7 +1,11 @@
<h1>Hello {name}!</h1> <script>
export let name;
</script>
<style> <style>
h1 { h1 {
color: purple; color: purple;
} }
</style> </style>
<h1>Hello {name}!</h1>

View file

@ -1,8 +1,8 @@
import App from './App.html'; import App from './App.svelte';
const app = new App({ const app = new App({
target: document.body, target: document.body,
data: { props: {
name: 'world' name: 'world'
} }
}); });