@ecoding/base.build 0.0.7 → 0.0.9

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.
@@ -1,28 +1,28 @@
1
- const { resolve } = require('path');
2
- const fs = require('fs');
1
+ const { resolve } = require("path");
2
+ const fs = require("fs");
3
3
  const cwd = process.cwd();
4
4
 
5
5
  const rootPath = (pathname) => {
6
- return resolve(cwd, pathname)
7
- }
6
+ return resolve(cwd, pathname);
7
+ };
8
8
 
9
9
  const resolvePath = resolve;
10
10
 
11
11
  const getEntries = () => {
12
- const dirPath = rootPath('./src/pages')
13
- const pages = fs.readdirSync(dirPath)
14
- const pagesObj = {}
12
+ const dirPath = rootPath("./src/pages");
13
+ const pages = fs.readdirSync(dirPath);
14
+ const pagesObj = {};
15
15
  pages.forEach((pageName) => {
16
- pagesObj[pageName] = rootPath(`./src/pages/${pageName}/main.tsx`);
16
+ pagesObj[pageName] = rootPath(`./src/pages/${pageName}/index.tsx`);
17
17
  });
18
18
  return {
19
19
  pagesObj,
20
20
  pages
21
- }
22
- }
21
+ };
22
+ };
23
23
 
24
24
  module.exports = {
25
25
  rootPath,
26
26
  resolvePath,
27
27
  entry: getEntries()
28
- }
28
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/base.build",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "tpl building",
5
5
  "author": "cxc",
6
6
  "license": "MIT",
@@ -17,8 +17,8 @@
17
17
  "@babel/preset-env": "7.18.2",
18
18
  "@babel/preset-react": "7.17.12",
19
19
  "@babel/preset-typescript": "7.17.12",
20
- "@ecoding/base.mock": "^0.0.3",
21
- "@ecoding/base.spec": "^0.0.3",
20
+ "@ecoding/base.mock": "0.*",
21
+ "@ecoding/base.spec": "*",
22
22
  "@svgr/webpack": "6.2.1",
23
23
  "@typescript-eslint/eslint-plugin": "5.28.0",
24
24
  "@typescript-eslint/parser": "5.28.0",
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "e15590c3278ffea8dc7fe8c8a1fd9e08fadc9231"
55
+ "gitHead": "dba212f7c4b60a4ff6136340c0df65d90244a2f7"
56
56
  }