@nera-static/core 4.9.1 → 4.9.2
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 +9 -3
- package/src/watch-assets.js +0 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nera-static/core",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.2",
|
|
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": {
|
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
"./package.json": "./package.json"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"src
|
|
16
|
+
"src/core.js",
|
|
17
|
+
"src/index.js",
|
|
18
|
+
"src/render.js",
|
|
19
|
+
"src/resolve.js",
|
|
20
|
+
"src/setup-plugins.js",
|
|
21
|
+
"src/site-model.js",
|
|
22
|
+
"src/theme.js",
|
|
17
23
|
"index.js"
|
|
18
24
|
],
|
|
19
25
|
"publishConfig": {
|
|
@@ -56,6 +62,7 @@
|
|
|
56
62
|
"homepage": "https://github.com/seebaermichi/nera#readme",
|
|
57
63
|
"dependencies": {
|
|
58
64
|
"cpy": "^13.2.2",
|
|
65
|
+
"dotenv": "^17.2.0",
|
|
59
66
|
"fs-readdir-recursive": "^1.1.0",
|
|
60
67
|
"gray-matter": "^4.0.3",
|
|
61
68
|
"markdown-it": "^14.1.0",
|
|
@@ -69,7 +76,6 @@
|
|
|
69
76
|
"devDependencies": {
|
|
70
77
|
"chokidar": "^5.0.0",
|
|
71
78
|
"concurrently": "^10.0.3",
|
|
72
|
-
"dotenv": "^17.2.0",
|
|
73
79
|
"eslint": "^10.7.0",
|
|
74
80
|
"husky": "^9.1.7",
|
|
75
81
|
"nodemon": "^3.0.3",
|
package/src/watch-assets.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import chokidar from 'chokidar'
|
|
2
|
-
import fs from 'fs'
|
|
3
|
-
import { copyFolder } from './render.js'
|
|
4
|
-
import path from 'path'
|
|
5
|
-
import dotenv from 'dotenv'
|
|
6
|
-
|
|
7
|
-
dotenv.config()
|
|
8
|
-
|
|
9
|
-
// Mirror the presentation probe in core.js (ROADMAP-themes.md §1b): a site's own
|
|
10
|
-
// assets live under theme/ in the revised layout, falling back to the legacy
|
|
11
|
-
// root assets/ so an unmigrated site still watches the right folder.
|
|
12
|
-
const sourceFolder = fs.existsSync('theme')
|
|
13
|
-
? path.resolve('theme/assets')
|
|
14
|
-
: path.resolve('assets')
|
|
15
|
-
const distFolder = path.resolve('public')
|
|
16
|
-
|
|
17
|
-
// Read the site's .neraignore from the site root ('.'), matching the render
|
|
18
|
-
// pipeline — it stays there even though assets now live under theme/assets.
|
|
19
|
-
const initialCopy = () => copyFolder(sourceFolder, distFolder, '.')
|
|
20
|
-
|
|
21
|
-
// Initial copy
|
|
22
|
-
await initialCopy()
|
|
23
|
-
|
|
24
|
-
chokidar
|
|
25
|
-
.watch(sourceFolder, { ignoreInitial: true })
|
|
26
|
-
.on('all', async (event, filePath) => {
|
|
27
|
-
console.log(`[watch-assets] ${event} → ${filePath}`)
|
|
28
|
-
await initialCopy()
|
|
29
|
-
})
|