@nera-static/plugin-utils 1.6.0 → 1.6.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/README.md +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ if (validateNeraProject()) {
|
|
|
91
91
|
|
|
92
92
|
Publishes specific template files from a plugin to a Nera project.
|
|
93
93
|
|
|
94
|
-
The destination is **theme-aware**, resolved exactly as the generator resolves its views folder (see `resolveViewsDir` below): `theme/views/vendor/<pluginName>/` on a themed site, the deprecated root `views/vendor/<pluginName>/` otherwise. If it already exists, publishing is **skipped** and the function returns `true` — this protects the customizations you have made to previously published templates. Pass `force: true` to overwrite them.
|
|
94
|
+
The destination is **theme-aware**, resolved exactly as the generator resolves its views folder (see `resolveViewsDir` below): `theme/views/vendor/<pluginName>/` on a themed site (one with a local `theme/` folder — what `nera new` scaffolds), the deprecated root `views/vendor/<pluginName>/` otherwise. If it already exists, publishing is **skipped** and the function returns `true` — this protects the customizations you have made to previously published templates. Pass `force: true` to overwrite them.
|
|
95
95
|
|
|
96
96
|
```js
|
|
97
97
|
import { publishTemplates } from '@nera-static/plugin-utils'
|
|
@@ -209,8 +209,8 @@ A plugin exports `getAppData` and/or `getMetaData`. Both receive a single object
|
|
|
209
209
|
See the [Nera contributing guide](https://github.com/seebaermichi/nera/blob/main/CONTRIBUTING.md) for the full plugin contract.
|
|
210
210
|
|
|
211
211
|
```js
|
|
212
|
-
// bin/publish-template.js - Template publishing script
|
|
213
212
|
#!/usr/bin/env node
|
|
213
|
+
// bin/publish-template.js - Template publishing script
|
|
214
214
|
|
|
215
215
|
import path from 'path'
|
|
216
216
|
import { fileURLToPath } from 'url'
|
|
@@ -262,7 +262,7 @@ Created and maintained by [@seebaermichi](https://github.com/seebaermichi)
|
|
|
262
262
|
## 🧩 Compatibility
|
|
263
263
|
|
|
264
264
|
- **Node.js**: >= 20.0.0
|
|
265
|
-
- **Runtime dependency**: `js-yaml ^
|
|
265
|
+
- **Runtime dependency**: `js-yaml ^5.2.2` only
|
|
266
266
|
- **Nera**: no direct dependency on the generator — this package is used by
|
|
267
267
|
plugins, not by the generator itself
|
|
268
268
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nera-static/plugin-utils",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Shared utility functions for Nera plugins (config loading, template publishing)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"eslint": "^10.8.0",
|
|
33
33
|
"husky": "^9.1.7",
|
|
34
|
-
"vitest": "^
|
|
34
|
+
"vitest": "^5.0.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"test": "vitest",
|