@sveltejs/adapter-node
Advanced tools
Comparing version 1.0.0-next.7 to 1.0.0-next.8
# @sveltejs/adapter-node | ||
## 1.0.0-next.8 | ||
### Patch Changes | ||
- 9212aa5: Add options to adapter-node, and add adapter types | ||
## 1.0.0-next.7 | ||
@@ -4,0 +10,0 @@ |
19
index.js
@@ -5,9 +5,14 @@ import { copyFileSync } from 'fs'; | ||
export default function () { | ||
return { | ||
/** | ||
* @param {{ | ||
* out?: string; | ||
* }} options | ||
*/ | ||
export default function ({ out = 'build' } = {}) { | ||
/** @type {import('@sveltejs/kit').Adapter} */ | ||
const adapter = { | ||
async adapt(builder) { | ||
const dir = dirname(fileURLToPath(import.meta.url)); | ||
const out = 'build'; // TODO implement adapter options | ||
builder.log.minor('Writing client application...'); | ||
builder.log.minor('Copying assets'); | ||
const static_directory = join(out, 'assets'); | ||
@@ -17,3 +22,3 @@ builder.copy_client_files(static_directory); | ||
builder.log.minor('Building server'); | ||
builder.log.minor('Copying server'); | ||
builder.copy_server_files(out); | ||
@@ -23,3 +28,3 @@ | ||
builder.log.minor('Prerendering static pages...'); | ||
builder.log.minor('Prerendering static pages'); | ||
await builder.prerender({ | ||
@@ -30,2 +35,4 @@ dest: `${out}/prerendered` | ||
}; | ||
return adapter; | ||
} |
{ | ||
"name": "@sveltejs/adapter-node", | ||
"version": "1.0.0-next.7", | ||
"version": "1.0.0-next.8", | ||
"main": "index.js", | ||
@@ -20,7 +20,9 @@ "type": "module", | ||
"@sveltejs/app-utils": "1.0.0-next.3", | ||
"@sveltejs/kit": "1.0.0-next.50", | ||
"compression": "^1.7.4", | ||
"polka": "^0.5.2", | ||
"rollup": "^2.41.1", | ||
"sirv": "^1.0.11" | ||
"sirv": "^1.0.11", | ||
"typescript": "^4.2.3" | ||
} | ||
} |
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
492179
13812
8