@sveltejs/adapter-netlify
Advanced tools
Comparing version
23
index.js
@@ -5,2 +5,3 @@ const fs = require('fs'); | ||
const glob = require('tiny-glob/sync'); | ||
const { prerender } = require('@sveltejs/app-utils'); | ||
@@ -13,5 +14,6 @@ const mkdirp = dir => { | ||
module.exports = function builder({ | ||
input, | ||
manifest | ||
module.exports = async function builder({ | ||
dir, | ||
manifest, | ||
log | ||
}) { | ||
@@ -48,3 +50,3 @@ let netlify_config; | ||
// copy client code | ||
const client_code = path.resolve(input, 'client'); | ||
const client_code = path.resolve(dir, 'client'); | ||
glob('**/*', { cwd: client_code, filesOnly: true }).forEach(file => { | ||
@@ -57,4 +59,13 @@ if (file[0] !== '.') { | ||
// prerender | ||
log.minor('Prerendering static pages...'); | ||
await prerender({ | ||
dir, | ||
out: publish, | ||
manifest, | ||
log | ||
}); | ||
// copy server code | ||
const server_code = path.resolve(input, 'server'); | ||
const server_code = path.resolve(dir, 'server'); | ||
glob('**/*', { cwd: server_code, filesOnly: true }).forEach(file => { | ||
@@ -86,3 +97,3 @@ if (file[0] !== '.') { | ||
// copy client manifest | ||
fs.copyFileSync(`${input}/client.json`, `${functions}/render/client.json`); | ||
fs.copyFileSync(`${dir}/client.json`, `${functions}/render/client.json`); | ||
@@ -89,0 +100,0 @@ // copy template |
{ | ||
"name": "@sveltejs/adapter-netlify", | ||
"version": "0.0.7", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^15.1.0", | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"@rollup/plugin-sucrase": "^3.1.0", | ||
"@sveltejs/app-utils": "0.0.3", | ||
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.2.0", | ||
"@typescript-eslint/eslint-plugin": "^4.4.0", | ||
"devalue": "^2.0.1", | ||
"eslint": "^7.11.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"rollup": "^2.29.0", | ||
"typescript": "^4.0.3" | ||
}, | ||
"main": "index.js", | ||
"files": [ | ||
"render.js" | ||
], | ||
"scripts": { | ||
"dev": "rollup -cw", | ||
"build": "rollup -c", | ||
"prepublish": "npm run build" | ||
}, | ||
"dependencies": { | ||
"tiny-glob": "^0.2.6", | ||
"toml": "^3.0.0" | ||
} | ||
"name": "@sveltejs/adapter-netlify", | ||
"version": "0.0.8", | ||
"devDependencies": { | ||
"@sveltejs/app-utils": "0.0.7", | ||
"devalue": "^2.0.1", | ||
"rollup": "^2.32.0" | ||
}, | ||
"main": "index.js", | ||
"files": [ | ||
"render.js" | ||
], | ||
"scripts": { | ||
"dev": "rollup -cw", | ||
"build": "rollup -c", | ||
"prepare": "npm run build", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"dependencies": { | ||
"kleur": "^4.1.3", | ||
"tiny-glob": "^0.2.6", | ||
"toml": "^3.0.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
107705
2.23%3
-72.73%6
50%0
-100%2413
1.26%3
50%+ Added
+ Added