@nera-static/core 4.15.0 → 4.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/render.js +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nera-static/core",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.1",
|
|
4
4
|
"description": "The Nera static site generator engine — the build pipeline and the layered theme/view resolver, importable by the Nera CLI, @nera-static/validate and tooling",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"exports": {
|
package/src/render.js
CHANGED
|
@@ -8,7 +8,9 @@ import { rimraf } from 'rimraf'
|
|
|
8
8
|
import dotenv from 'dotenv'
|
|
9
9
|
import { makeLayeredResolver, resolveEntry } from './resolve.js'
|
|
10
10
|
|
|
11
|
-
dotenv
|
|
11
|
+
// `quiet` drops dotenv's `◇ injected env (N) from .env` banner from every build;
|
|
12
|
+
// the `.env` values are still loaded into `process.env`.
|
|
13
|
+
dotenv.config({ quiet: true })
|
|
12
14
|
|
|
13
15
|
const SUCCESS_COLOR = '\x1b[32m%s\x1b[0m'
|
|
14
16
|
|
|
@@ -510,10 +512,13 @@ export const createHtmlFiles = async (
|
|
|
510
512
|
await fs.mkdir(path.dirname(htmlPath), { recursive: true })
|
|
511
513
|
await fs.writeFile(htmlPath, pretty(html), 'utf-8')
|
|
512
514
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
515
|
+
// Name the file actually written, as its path under `public/`
|
|
516
|
+
// (`/de/index.html`), so every page gets a distinct line.
|
|
517
|
+
const outputPath = path
|
|
518
|
+
.relative(publicFolder, htmlPath)
|
|
519
|
+
.split(path.sep)
|
|
520
|
+
.join('/')
|
|
521
|
+
console.log(SUCCESS_COLOR, `HTML created: /${outputPath}`)
|
|
517
522
|
}
|
|
518
523
|
}
|
|
519
524
|
} else {
|