Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sveltejs/adapter-static

Package Overview
Dependencies
Maintainers
4
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltejs/adapter-static - npm Package Compare versions

Comparing version 1.0.0-next.15 to 1.0.0-next.16

6

CHANGELOG.md
# @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 @@

2

index.js

@@ -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 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc