@sveltejs/adapter-static
Advanced tools
Comparing version 1.0.0-next.15 to 1.0.0-next.16
# @sveltejs/adapter-static | ||
## 1.0.0-next.16 | ||
### Patch Changes | ||
- 94b34fa6: [breaking] standardize final output dir as /build (vs /.svelte-kit) | ||
## 1.0.0-next.15 | ||
@@ -4,0 +10,0 @@ |
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
export default function ({ pages = '.svelte-kit/static/build', assets = pages, fallback } = {}) { | ||
export default function ({ pages = 'build', assets = pages, fallback } = {}) { | ||
/** @type {import('@sveltejs/kit').Adapter} */ | ||
@@ -11,0 +11,0 @@ const adapter = { |
{ | ||
"name": "@sveltejs/adapter-static", | ||
"version": "1.0.0-next.15", | ||
"version": "1.0.0-next.16", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,4 +17,4 @@ # @sveltejs/adapter-static | ||
// default options are shown | ||
pages: '.svelte-kit/static/build', | ||
assets: '.svelte-kit/static/build', | ||
pages: 'build', | ||
assets: 'build', | ||
fallback: null | ||
@@ -32,3 +32,3 @@ }) | ||
The directory to write prerendered pages to. It defaults to `.svelte-kit/static/build`. | ||
The directory to write prerendered pages to. It defaults to `build`. | ||
@@ -35,0 +35,0 @@ ### assets |
@@ -7,3 +7,3 @@ import fs from 'fs'; | ||
test('generates HTML files', ({ cwd }) => { | ||
assert.ok(fs.existsSync(`${cwd}/.svelte-kit/static/build/index.html`)); | ||
assert.ok(fs.existsSync(`${cwd}/build/index.html`)); | ||
}); | ||
@@ -19,11 +19,11 @@ | ||
test('generates a fallback page', ({ cwd }) => { | ||
assert.ok(fs.existsSync(`${cwd}/.svelte-kit/static/build/200.html`)); | ||
assert.ok(fs.existsSync(`${cwd}/build/200.html`)); | ||
}); | ||
test('does not prerender pages without prerender=true', ({ cwd }) => { | ||
assert.ok(!fs.existsSync(`${cwd}/.svelte-kit/static/build/index.html`)); | ||
assert.ok(!fs.existsSync(`${cwd}/build/index.html`)); | ||
}); | ||
test('prerenders page with prerender=true', ({ cwd }) => { | ||
assert.ok(fs.existsSync(`${cwd}/.svelte-kit/static/build/about/index.html`)); | ||
assert.ok(fs.existsSync(`${cwd}/build/about/index.html`)); | ||
}); | ||
@@ -30,0 +30,0 @@ |
@@ -34,3 +34,3 @@ import child_process from 'child_process'; | ||
rimraf(`${cwd}/.svelte-kit/static/build`); | ||
rimraf(`${cwd}/build`); | ||
@@ -45,3 +45,3 @@ await spawn(`"${process.execPath}" ${cli_path} build`, { | ||
context.port = await ports.find(4000); | ||
const handler = sirv(`${cwd}/.svelte-kit/static/build`, { | ||
const handler = sirv(`${cwd}/build`, { | ||
single: '200.html' | ||
@@ -48,0 +48,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15177