Skip to content

Commit 7ecb000

Browse files
committed
Merge branch 'master' into netlify-functions-dir
2 parents e228bbc + 4e8e69c commit 7ecb000

File tree

25 files changed

+63
-30
lines changed

25 files changed

+63
-30
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@sveltejs/adapter-netlify': patch
3+
'@sveltejs/adapter-node': patch
4+
'@sveltejs/adapter-static': patch
5+
'create-svelte': patch
6+
---
7+
8+
[breaking] standardize final output dir as /build (vs /.svelte-kit)

.changeset/pre.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
"friendly-rivers-argue",
112112
"funny-needles-talk",
113113
"funny-terms-repair",
114+
"funny-trainers-hammer",
114115
"fuzzy-cougars-compare",
115116
"fuzzy-ghosts-call",
116117
"fuzzy-jeans-join",

documentation/docs/10-adapters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default {
1717
};
1818
```
1919

20-
With this, [svelte-kit build](#command-line-interface-svelte-kit-build) will generate a self-contained Node app inside `.svelte-kit/node/build`. You can pass options to adapters, such as customising the output directory in `adapter-node`:
20+
With this, [svelte-kit build](#command-line-interface-svelte-kit-build) will generate a self-contained Node app inside `build`. You can pass options to adapters, such as customising the output directory in `adapter-node`:
2121

2222
```diff
2323
// svelte.config.js

documentation/docs/80-adapter-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ Within the `adapt` method, there are a number of things that an adapter should d
3434
- Call `utils.prerender`
3535
- Put the user's static files and the generated JS/CSS in the correct location for the target platform
3636

37-
If possible, we recommend putting the adapter output under `'.svelte-kit/' + adapterName` with any intermediate output under `'.svelte-kit/' + adapterName + '/intermediate'`.
37+
If possible, we recommend putting the adapter output under the `build/` directory with any intermediate output placed under `'.svelte-kit/' + adapterName`.
3838

3939
> The adapter API may change before 1.0.

packages/adapter-netlify/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @sveltejs/adapter-netlify
22

3+
## 1.0.0-next.27
4+
5+
### Patch Changes
6+
7+
- 94b34fa6: [breaking] standardize final output dir as /build (vs /.svelte-kit)
8+
39
## 1.0.0-next.26
410

511
### Patch Changes

packages/adapter-netlify/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ Then, make sure you have a [netlify.toml](https://docs.netlify.com/configure-bui
3232
```toml
3333
[build]
3434
command = "npm run build"
35-
publish = ".svelte-kit/netlify/build/"
35+
publish = "build/publish/"
3636
```
3737

38-
There should be no need to change the publish location, but if you specify another location, you will probably also want to add it to your `.gitignore`.
39-
4038
## Netlify alternatives to SvelteKit functionality
4139

4240
You may build your app using functionality provided directly by SvelteKit without relying on any Netlify functionality. Using the SvelteKit versions of these features will allow them to be used in dev mode, tested with integration tests, and to work with other adapters should you ever decide to switch away from Netlify. However, in some scenarios you may find it beneficial to use the Netlify versions of these features. One example would be if you're migrating an app that's already hosted on Netlify to SvelteKit.

packages/adapter-netlify/files/entry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// TODO hardcoding the relative location makes this brittle
2-
import { init, render } from '../../output/server/app.js'; // eslint-disable-line import/no-unresolved
2+
import { init, render } from '../output/server/app.js'; // eslint-disable-line import/no-unresolved
33
import { isContentTypeTextual } from '@sveltejs/kit/adapter-utils'; // eslint-disable-line import/no-unresolved
44

55
init();

packages/adapter-netlify/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export default function (options) {
2626
const files = fileURLToPath(new URL('./files', import.meta.url));
2727

2828
utils.log.minor('Generating serverless function...');
29-
utils.copy(join(files, 'entry.js'), '.svelte-kit/netlify/intermediate/entry.js');
29+
utils.copy(join(files, 'entry.js'), '.svelte-kit/netlify/entry.js');
3030

3131
/** @type {BuildOptions} */
3232
const defaultOptions = {
33-
entryPoints: ['.svelte-kit/netlify/intermediate/entry.js'],
33+
entryPoints: ['.svelte-kit/netlify/entry.js'],
3434
outfile: '.netlify/functions-internal/__render.js',
3535
bundle: true,
3636
inject: [join(files, 'shims.js')],

packages/adapter-netlify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sveltejs/adapter-netlify",
3-
"version": "1.0.0-next.26",
3+
"version": "1.0.0-next.27",
44
"type": "module",
55
"exports": {
66
"import": "./index.js"

packages/adapter-node/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @sveltejs/adapter-node
22

3+
## 1.0.0-next.39
4+
5+
### Patch Changes
6+
7+
- 94b34fa6: [breaking] standardize final output dir as /build (vs /.svelte-kit)
8+
39
## 1.0.0-next.38
410

511
### Patch Changes

0 commit comments

Comments
 (0)