rigjs 2.1.0 → 2.1.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.
@@ -4,6 +4,7 @@ import shell from 'shelljs';
4
4
  import path from 'path';
5
5
  import fs from 'fs';
6
6
  import vueEnv from '../vue-env';
7
+ const print = require('../print');
7
8
 
8
9
  const JSON5 = require('json5');
9
10
 
@@ -68,6 +69,7 @@ export default async (cmd: any) => {
68
69
  switch (frameworktype) {
69
70
  case FrameworkType.vue: {
70
71
  vueEnv.useEnv(ep.vue_env!, ep.extra_env);
72
+ //推测vue脚本
71
73
  if (!ep.build) ep.build = 'npx vue-cli-service build --mode rig';
72
74
  }
73
75
  break;
@@ -75,6 +77,7 @@ export default async (cmd: any) => {
75
77
  break;
76
78
  }
77
79
  ep.build = ep.build.replace(regexPublicPath, ep.publicPath);
80
+ print.info(`using build script:${ep.build}`);
78
81
  shell.exec(ep.build);
79
82
  //setup default defines and replace text in built source.
80
83
  if (!ep.defines) ep.defines = {};
package/lib/tag/index.js CHANGED
@@ -11,26 +11,28 @@ const print = require('../print');
11
11
  let red = chalk.red;
12
12
 
13
13
 
14
- const load = async ()=>{
15
- try {
16
- let pkgJson = JSON.parse(fs.readFileSync('package.json').toString());
17
- let version = pkgJson.version;
18
- if (!fs.existsSync('.git')) {
19
- print.error('.git not found at the level of package.json');
20
- print.error('should run "rig tag" in the directory with both .git and package.json');
21
- return;
22
- }
23
- let statusProcess = shell.exec('git status',{silent:true});
24
- if (statusProcess.stdout.indexOf('nothing to commit')>=0) {
25
- shell.exec(`git tag ${version}`);
26
- print.succeed(`tag:${version} created.`);
27
- }else {
28
- print.error(statusProcess.stdout);
29
- }
30
- }catch (e){
31
- console.log(red(e.message));
32
- }
14
+ const load = async () => {
15
+ try {
16
+ let pkgJson = JSON.parse(fs.readFileSync('package.json').toString());
17
+ let version = pkgJson.version;
18
+ if (!fs.existsSync('.git')) {
19
+ print.error('.git not found at the level of package.json');
20
+ print.error('should run "rig tag" in the directory with both .git and package.json');
21
+ process.exit(1)
22
+ }
23
+ let statusProcess = shell.exec('git status', {silent: true});
24
+ if (statusProcess.stdout.indexOf('nothing to commit') >= 0) {
25
+ shell.exec(`git tag ${version}`);
26
+ print.succeed(`tag:${version} created.`);
27
+ } else {
28
+ print.error(statusProcess.stdout);
29
+ process.exit(1)
30
+ }
31
+ } catch (e) {
32
+ console.log(red(e.message));
33
+ process.exit(1)
34
+ }
33
35
  }
34
36
  module.exports = {
35
- load
37
+ load
36
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rigjs",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "A multi-repos dev tool based on yarn and git.Rig is inspired by cocoapods. Not like those monorepo solutions,rig is a tool for organizing multi-repos.",
5
5
  "keywords": [
6
6
  "modular",