rigjs 3.0.6 → 3.0.7

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.
@@ -0,0 +1,4 @@
1
+ declare namespace rig_helper {
2
+ export const getPkgs: () => string[]
3
+ }
4
+ export default rig_helper;
@@ -1,10 +1,10 @@
1
1
  const json5 = require('json5');
2
2
  const fs = require('fs');
3
- const getRigDeps = () => {
4
- let rigConfig = json5.parse(fs.readFileSync('./package.rig.json5'));
5
- return Object.keys(rigConfig.dependencies);
3
+ const getPkgs = () => {
4
+ let rigPkg = json5.parse(fs.readFileSync('./package.rig.json5'));
5
+ return Object.keys(rigPkg.dependencies);
6
6
  }
7
+
7
8
  module.exports = {
8
- getPkgs: getRigDeps,
9
- getRigDeps
9
+ getPkgs
10
10
  }
package/lib/init/index.ts CHANGED
@@ -30,10 +30,19 @@ export default async () => {
30
30
  print.info('rig_helper.js already exists~');
31
31
  } else {
32
32
  print.info('create rig_helper.js');
33
- const resRigHelper = await axios.get('https://gist.githubusercontent.com/FlashHand/c13135e8b9cd088221fbbfdb51f104ca/raw/baa02b804ee5b1186b06ca172f80b55003317bcc/rigHelper.js');
33
+ const resRigHelper = await axios.get('https://gist.githubusercontent.com/FlashHand/f468123502fd7aa87933fd8e39ed6926/raw/d5c219db59df54656e614a98c7ed3eb79e9d86f4/rig_helper.js');
34
34
  const rigHelper = resRigHelper.data;
35
35
  fs.writeFileSync(`${process.cwd()}/rig_helper.js`, rigHelper);
36
36
  }
37
+ //检查是否存在rig_helper.d.ts
38
+ if (fs.existsSync(`${process.cwd()}/rig_helper.d.ts`)) {
39
+ print.info('rig_helper.d.ts already exists~');
40
+ } else {
41
+ print.info('create rig_helper.d.ts');
42
+ const resRigHelperDts = await axios.get('https://gist.githubusercontent.com/FlashHand/f468123502fd7aa87933fd8e39ed6926/raw/d5c219db59df54656e614a98c7ed3eb79e9d86f4/rig_helper.d.ts');
43
+ const rigHelperDts = resRigHelperDts.data;
44
+ fs.writeFileSync(`${process.cwd()}/rig_helper.d.ts`, rigHelperDts);
45
+ }
37
46
  //检查rig_dev是否存在
38
47
  if (fs.existsSync('./rig_dev') && fs.lstatSync('./rig_dev').isDirectory()) {
39
48
  print.info('folder rig_dev already exists~');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rigjs",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "A multi-repos dev tool based on yarn and git.Rigjs is intended to be the simplest way to develop,share and deliver codes between different developers or different projects.",
5
5
  "keywords": [
6
6
  "modular",