mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-15 12:24:47 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
278be67228 | ||
|
|
64921dfc3c | ||
|
|
c8962ccf8c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,3 +12,4 @@ sapper
|
|||||||
runtime.js
|
runtime.js
|
||||||
dist
|
dist
|
||||||
!rollup.config.js
|
!rollup.config.js
|
||||||
|
templates/*.js
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
# sapper changelog
|
# sapper changelog
|
||||||
|
|
||||||
|
## 0.22.2
|
||||||
|
|
||||||
|
* Make paths in generated code relative to project
|
||||||
|
|
||||||
## 0.22.1
|
## 0.22.1
|
||||||
|
|
||||||
* Fix `pkg.files`
|
* Fix `pkg.files`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sapper",
|
"name": "sapper",
|
||||||
"version": "0.22.1",
|
"version": "0.22.2",
|
||||||
"description": "Military-grade apps, engineered by Svelte",
|
"description": "Military-grade apps, engineered by Svelte",
|
||||||
"bin": {
|
"bin": {
|
||||||
"sapper": "./sapper"
|
"sapper": "./sapper"
|
||||||
|
|||||||
@@ -204,9 +204,12 @@ function generate_server(
|
|||||||
error
|
error
|
||||||
};`.replace(/^\t\t/gm, '').trim();
|
};`.replace(/^\t\t/gm, '').trim();
|
||||||
|
|
||||||
|
const build_dir = path.relative(process.cwd(), locations.dest());
|
||||||
|
const src_dir = path.relative(process.cwd(), locations.src());
|
||||||
|
|
||||||
return `// This file is generated by Sapper — do not edit it!\n` + template
|
return `// This file is generated by Sapper — do not edit it!\n` + template
|
||||||
.replace('__BUILD__DIR__', JSON.stringify(locations.dest()))
|
.replace('__BUILD__DIR__', JSON.stringify(build_dir))
|
||||||
.replace('__SRC__DIR__', JSON.stringify(locations.src()))
|
.replace('__SRC__DIR__', JSON.stringify(src_dir))
|
||||||
.replace('__DEV__', dev() ? 'true' : 'false')
|
.replace('__DEV__', dev() ? 'true' : 'false')
|
||||||
.replace(/const manifest = __MANIFEST__;/, code);
|
.replace(/const manifest = __MANIFEST__;/, code);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user