config2ts 2.5.0 → 2.5.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 CHANGED
@@ -56,7 +56,7 @@ export type Mp3Asset = { path: string; type: 'mp3' };
56
56
  export type PngAsset = { path: string; type: 'png' };
57
57
  export type SvgAsset = { path: string; type: 'svg' };
58
58
 
59
- export const RES = {
59
+ export const ASSETS = {
60
60
  public: {
61
61
  image: {
62
62
  adjustHorizontal: {path:'public/image/adjust-horizontal.png',type:'png'},
@@ -76,9 +76,9 @@ export const RES = {
76
76
  ### usage
77
77
 
78
78
  ```typescript
79
- import { RES } from "./assets";
79
+ import { ASSETS } from "./assets";
80
80
 
81
- const meta = RES.public.image.adjustHorizontal;
81
+ const meta = ASSETS.public.image.adjustHorizontal;
82
82
  // meta.path → 'public/image/adjust-horizontal.png'
83
83
  // meta.type → 'png'
84
84
  ```
package/lib/config2ts.js CHANGED
@@ -443,7 +443,7 @@ function assets2ts(assetsDir) {
443
443
  }
444
444
  if (sortedExts.length > 0)
445
445
  template += "\n";
446
- template += `export const RES = {\n`;
446
+ template += `export const ASSETS = {\n`;
447
447
  const rootUt = uniformDirs.get(root);
448
448
  template += ` ${dirName}: {\n`;
449
449
  template += serializeAssetNode(root, " ", uniformDirs, extTypeMap);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "config2ts",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "convert config to ts file.",
5
5
  "main": "lib/config2ts.js",
6
6
  "types": "lib/config2ts.d.ts",