Skip to content

Commit

Permalink
svelte.technology -> v2.svelte.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Apr 21, 2019
1 parent be919d9 commit 8aad909
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2017 [these people](https://github.com/sveltejs/svelte.technology/graphs/contributors)
Copyright (c) 2017 [these people](https://github.com/sveltejs/v2.svelte.dev/graphs/contributors)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
10 changes: 5 additions & 5 deletions README.md
@@ -1,6 +1,6 @@
# [svelte.technology](https://svelte.technology)
# [v2.svelte.dev](https://v2.svelte.dev)

The website for Svelte.
The website for Svelte v2.

## Note

Expand All @@ -13,8 +13,8 @@ This project uses [yarn](https://yarnpkg.com) to manage dependencies.
Set up the project:

```bash
git clone git@github.com:sveltejs/svelte.technology.git
cd svelte.technology
git clone git@github.com:sveltejs/v2.svelte.dev.git
cd v2.svelte.dev
yarn
```

Expand All @@ -29,7 +29,7 @@ cd /path/to/svelte
yarn link
yarn dev # rebuild Svelte on changes

cd /path/to/svelte.technology
cd /path/to/v2.svelte.dev
yarn link svelte
yarn dev
```
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2017-08-07-the-easiest-way-to-get-started.md
Expand Up @@ -13,7 +13,7 @@ Because of that, getting started with it can be a little bit confusing at first.

## 1. Use the REPL

The [Svelte REPL](https://svelte.technology/repl) is the easiest way to begin. You can choose from a list of examples to get you started, and tweak them until they do what you want.
The [Svelte REPL](repl) is the easiest way to begin. You can choose from a list of examples to get you started, and tweak them until they do what you want.

<aside>You'll need to have [Node.js](https://nodejs.org/) installed, and know how to use the terminal</aside>

Expand Down
2 changes: 1 addition & 1 deletion content/blog/2017-09-06-the-zen-of-just-writing-css.md
Expand Up @@ -28,7 +28,7 @@ The consequence of all this is the **append-only stylesheet**. There's no way of

The idea behind SFCs is simple: you write your components in an HTML file that (optionally) contains a `<style>` and `<script>` attribute describing the component's styles and behaviour. Svelte, Ractive, Vue and Polymer all follow this basic pattern.

<aside>[Read the introductory blog post](https://svelte.technology/blog/frameworks-without-the-framework) if you're new to Svelte. Or [read](https://twitter.com/padolsey/status/899717303234908160) [the](https://twitter.com/sveltejs/status/901818357644701696) [testimonials](https://twitter.com/sveltejs/status/901818106309476352).</aside>
<aside>[Read the introductory blog post](blog/frameworks-without-the-framework) if you're new to Svelte. Or [read](https://twitter.com/padolsey/status/899717303234908160) [the](https://twitter.com/sveltejs/status/901818357644701696) [testimonials](https://twitter.com/sveltejs/status/901818106309476352).</aside>

(For the rest of this article we'll be using Svelte, obviously. But if the idea of using a template language makes you shudder — your fears are misplaced, but that's a topic for another day — then just use Vue which lets you use JSX in your SFCs.)

Expand Down
Expand Up @@ -39,7 +39,7 @@ We can do better!

## The compiler-as-framework paradigm shift

[Svelte introduced a radical idea](https://svelte.technology/blog/frameworks-without-the-framework): what if your UI framework wasn't a framework at all, but a compiler that turned your components into standalone JavaScript modules? Instead of using a library like React or Vue, which knows nothing about your app and must therefore be a one-size-fits-all solution, we can ship highly-optimised vanilla JavaScript. Just the code your app needs, and without the memory and performance overhead of solutions based on a virtual DOM.
[Svelte introduced a radical idea](blog/frameworks-without-the-framework): what if your UI framework wasn't a framework at all, but a compiler that turned your components into standalone JavaScript modules? Instead of using a library like React or Vue, which knows nothing about your app and must therefore be a one-size-fits-all solution, we can ship highly-optimised vanilla JavaScript. Just the code your app needs, and without the memory and performance overhead of solutions based on a virtual DOM.

The JavaScript world is [moving towards this model](https://tomdale.net/2017/09/compilers-are-the-new-frameworks/). [Stencil](https://stenciljs.com), a Svelte-inspired framework from the Ionic team, compiles to web components. [Glimmer](https://glimmerjs.com) *doesn't* compile to standalone JavaScript (the pros and cons of which deserve a separate blog post), but the team is doing some fascinating research around compiling templates to bytecode. (React is [getting in on the action](https://twitter.com/trueadm/status/944908776896978946), though their current research focuses on optimising your JSX app code, which is arguably more similar to the ahead-of-time optimisations that Angular, Ractive and Vue have been doing for a few years.)

Expand Down Expand Up @@ -67,7 +67,7 @@ But size is only part of the story. Svelte apps are also extremely performant an

The biggest drawback for many developers evaluating Sapper would be 'but I like React, and I already know how to use it', which is fair.

If you're in that camp, I'd invite you to at least try alternative frameworks. You might be pleasantly surprised! The [Sapper RealWorld](https://github.com/sveltejs/realworld) implementation totals 1,201 lines of source code, compared to 2,377 for the reference implementation, because you're able to express concepts very concisely using Svelte's template syntax (which [takes all of five minutes to master](https://svelte.technology/guide#template-syntax)). You get [scoped CSS](the-zen-of-just-writing-css), with unused style removal and minification built-in, and you can use preprocessors like LESS if you want. You no longer need to use Babel. SSR is ridiculously fast, because it's just string concatenation. And we recently introduced [svelte/store](https://svelte.technology/guide#state-management), a tiny global store that synchronises state across your component hierarchy with zero boilerplate. The worst that can happen is that you'll end up feeling vindicated!
If you're in that camp, I'd invite you to at least try alternative frameworks. You might be pleasantly surprised! The [Sapper RealWorld](https://github.com/sveltejs/realworld) implementation totals 1,201 lines of source code, compared to 2,377 for the reference implementation, because you're able to express concepts very concisely using Svelte's template syntax (which [takes all of five minutes to master](guide#template-syntax)). You get [scoped CSS](the-zen-of-just-writing-css), with unused style removal and minification built-in, and you can use preprocessors like LESS if you want. You no longer need to use Babel. SSR is ridiculously fast, because it's just string concatenation. And we recently introduced [svelte/store](guide#state-management), a tiny global store that synchronises state across your component hierarchy with zero boilerplate. The worst that can happen is that you'll end up feeling vindicated!

But there are trade-offs nonetheless. Some people have a pathological aversion to any form of 'template language', and maybe that applies to you. JSX proponents will clobber you with the 'it's just JavaScript' mantra, and therein lies React's greatest strength, which is that it is infinitely flexible. That flexibility comes with its own set of trade-offs, but we're not here to discuss those.

Expand Down
2 changes: 1 addition & 1 deletion content/guide/03-scoped-styles.md
Expand Up @@ -99,7 +99,7 @@ For rules *not* to be removed, they must apply to the component's markup. As far
</script>
```

Instead of manually manipulating the DOM, you should always use the `class` attribute (or the [class directive](https://svelte.technology/guide#classes)):
Instead of manually manipulating the DOM, you should always use the `class` attribute (or the [class directive](guide#classes)):

```html
<!-- { repl: false } -->
Expand Down
2 changes: 1 addition & 1 deletion content/guide/99-still-to-come.md
Expand Up @@ -2,4 +2,4 @@
title: TODO...
---

This documentation is still a work-in-progress, like Svelte itself. If there are particular things that are missing or could be improved, then [please raise an issue on GitHub](https://github.com/sveltejs/svelte.technology)!
This documentation is still a work-in-progress, like Svelte itself. If there are particular things that are missing or could be improved, then [please raise an issue on GitHub](https://github.com/sveltejs/v2.svelte.dev)!
14 changes: 14 additions & 0 deletions now.json
@@ -0,0 +1,14 @@
{
"env": {
"NODE_ENV": "production",
"BASEURL": "https://v2.svelte.dev",
"GITHUB_CLIENT_ID": "@svelte-gist-client-id",
"GITHUB_CLIENT_SECRET": "@svelte-gist-client-secret"
},
"alias": "v2.svelte.dev",
"files": [
"__sapper__/build",
"static",
"content"
]
}
22 changes: 4 additions & 18 deletions package.json
@@ -1,5 +1,5 @@
{
"name": "svelte.technology",
"name": "v2.svelte.dev",
"version": "1.0.0",
"description": "Docs and examples for Svelte",
"scripts": {
Expand All @@ -17,17 +17,17 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/sveltejs/svelte.technology.git"
"url": "git+https://github.com/sveltejs/v2.svelte.dev.git"
},
"keywords": [
"svelte"
],
"author": "Rich Harris",
"license": "MIT",
"bugs": {
"url": "https://github.com/sveltejs/svelte.technology/issues"
"url": "https://github.com/sveltejs/v2.svelte.dev/issues"
},
"homepage": "https://github.com/sveltejs/svelte.technology#readme",
"homepage": "https://github.com/sveltejs/v2.svelte.dev#readme",
"devDependencies": {
"chalk": "^2.0.1",
"clean-css": "^4.2.1",
Expand Down Expand Up @@ -68,19 +68,5 @@
"shelljs": "^0.8.3",
"sourcemap-codec": "^1.4.1",
"svelte-extras": "^2.0.0"
},
"now": {
"env": {
"NODE_ENV": "production",
"BASEURL": "https://svelte.technology",
"GITHUB_CLIENT_ID": "@svelte-gist-client-id",
"GITHUB_CLIENT_SECRET": "@svelte-gist-client-secret"
},
"alias": "svelte.technology",
"files": [
"__sapper__/build",
"static",
"content"
]
}
}
8 changes: 4 additions & 4 deletions src/routes/blog/rss.xml.js
Expand Up @@ -13,17 +13,17 @@ const rss = `
<channel>
<title>Svelte blog</title>
<link>https://svelte.technology/blog</link>
<link>https://v2.svelte.dev/blog</link>
<description>News and information about the magical disappearing UI framework</description>
<image>
<url>https://svelte.technology/favicon.png</url>
<url>https://v2.svelte.dev/favicon.png</url>
<title>Svelte</title>
<link>https://svelte.technology/blog</link>
<link>https://v2.svelte.dev/blog</link>
</image>
${get_posts().map( post => `
<item>
<title>${post.metadata.title}</title>
<link>https://svelte.technology/blog/${post.slug}</link>
<link>https://v2.svelte.dev/blog/${post.slug}</link>
<description>${post.metadata.description}</description>
<pubDate>${formatPubdate(post.metadata.pubdate)}</pubDate>
</item>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/gist/create.js
Expand Up @@ -22,7 +22,7 @@ export async function post(req, res) {
}, null, ' ')
},
'README.md': {
content: `Created with [svelte.technology/repl](https://svelte.technology/repl)`
content: `Created with [svelte.dev/repl](https://svelte.dev/repl)`
}
};
components.forEach(component => {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/index.html
Expand Up @@ -7,7 +7,7 @@
<section id='{section.slug}'>
<h2>
{section.metadata.title}
<small><a href='https://github.com/sveltejs/svelte.technology/edit/master/content/guide/{section.file}'>edit this section</a></small>
<small><a href='https://github.com/sveltejs/v2.svelte.dev/edit/master/content/guide/{section.file}'>edit this section</a></small>
</h2>
{@html section.html}
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/template.html
Expand Up @@ -141,7 +141,7 @@
<meta name='twitter:creator' content='@sveltejs'>
<meta name='twitter:title' content='Svelte'>
<meta name='twitter:description' content='The magical disappearing UI framework'>
<meta name='twitter:image' content='https://svelte.technology/images/twitter-card.png'>
<meta name='twitter:image' content='https://v2.svelte.dev/images/twitter-card.png'>
</head>
<body>
<div id='sapper'>%sapper.html%</div>
Expand Down

1 comment on commit 8aad909

@vercel
Copy link

@vercel vercel bot commented on 8aad909 Apr 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now could not deploy this pull request since the "files" configuration in now.json lists these files or directories which do not exist:

  • __sapper__/build

These paths may be missing from the GitHub repository because of a .gitignore file.
Consider committing them to GitHub or removing them from the "files" list and generating the paths on Now instead using a build script for a Node.js deployment, or within your Dockerfile for a docker deployment.

For more information on the "files" configuration in now.json, visit https://zeit.co/docs/features/configuration#files(array)

Please sign in to comment.