alp-rollup-plugin-config 0.0.1 → 1.0.0
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/CHANGELOG.md +11 -0
- package/lib/index.cjs +8 -3
- package/package.json +4 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# 1.0.0 (2022-02-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **alp-rollup-plugin-config:** add plugin for rollup ([4d5cf63](https://github.com/christophehurpeau/alp/commit/4d5cf63af487f05e99651d6bc8959296e3cfe41e))
|
package/lib/index.cjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const copy = require('@guanghechen/rollup-plugin-copy');
|
|
3
|
+
const { copy } = require('@guanghechen/rollup-plugin-copy');
|
|
4
4
|
const { load } = require('js-yaml');
|
|
5
5
|
|
|
6
6
|
module.exports = (options) =>
|
|
7
7
|
copy({
|
|
8
8
|
...options,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
targets: options.targets.map((targetOptions) => ({
|
|
10
|
+
dest: 'build/config',
|
|
11
|
+
rename: (name, extension) => `${name}.json`,
|
|
12
|
+
transform: (contents, srcPath, destPath) =>
|
|
13
|
+
JSON.stringify(load(contents)).toString(),
|
|
14
|
+
...targetOptions,
|
|
15
|
+
})),
|
|
11
16
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alp-rollup-plugin-config",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "transform yaml config using rollup copy plugin and yaml transform",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"scripts": {
|
|
22
22
|
"lint": "yarn run lint:eslint",
|
|
23
|
-
"lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet alp-rollup-plugin-config"
|
|
23
|
+
"lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/alp-rollup-plugin-config"
|
|
24
24
|
},
|
|
25
25
|
"prettier": {
|
|
26
26
|
"trailingComma": "all",
|
|
@@ -31,5 +31,6 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@guanghechen/rollup-plugin-copy": "1.8.6",
|
|
33
33
|
"js-yaml": "4.1.0"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"gitHead": "1617223e61c2b76e0613a49012792fbf6d3b872b"
|
|
35
36
|
}
|