@digigov/cli-build 0.6.1 → 0.6.2

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,12 +1,12 @@
1
1
  {
2
2
  "files": {
3
- "tooling/cli-build/CHANGELOG.json": "7bd27895b469f863aa96b2d82c387d82e05b5cb3",
4
- "tooling/cli-build/CHANGELOG.md": "62bbdac2f9381e08e853e1ff663b36b335c1e93d",
3
+ "tooling/cli-build/CHANGELOG.json": "773fb4895947f3e282601547b9aa83fef1d61e4d",
4
+ "tooling/cli-build/CHANGELOG.md": "448317ae7848e9fa015dea8d2cc5dfde4e6a7bed",
5
5
  "tooling/cli-build/babel.common.js": "8840a687fb7edb7a97a43fdb25cc74d928717fbe",
6
6
  "tooling/cli-build/babel.config.js": "429fbd41ed59647228513cb014d79ef7f1bc43b3",
7
7
  "tooling/cli-build/copy-files.js": "1b0ce376c39c9ea8a300b013616dce2591bedb2a",
8
- "tooling/cli-build/index.js": "a4829beb8af4c5db4ff396368bff8173796da05a",
9
- "tooling/cli-build/package.json": "79670f429e5192cd95fd8f2234ee074d13f764b8",
8
+ "tooling/cli-build/index.js": "3803832b434b9dbd6056ea0ecde534510b8c2bd5",
9
+ "tooling/cli-build/package.json": "8a28f7e1d1d51ef7f6e9a7ce9a786a1ca4ae3a8b",
10
10
  "tooling/cli-build/tsconfig.base.json": "18a2d2c32d74bf3ec594128455a4aca9e18c92ba",
11
11
  "tooling/cli-build/tsconfig.common.json": "28e796bb93f60d45572398a033f2532fae87b1e4",
12
12
  "tooling/cli-build/tsconfig.json": "75a89e697fd49ce87f0cf43a631fad7e903512f7",
package/CHANGELOG.json CHANGED
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "name": "@digigov/cli-build",
3
3
  "entries": [
4
+ {
5
+ "version": "0.6.2",
6
+ "tag": "@digigov/cli-build_v0.6.2",
7
+ "date": "Thu, 03 Feb 2022 15:47:05 GMT",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "comment": "fix issue with typescript and cli build "
12
+ }
13
+ ]
14
+ }
15
+ },
4
16
  {
5
17
  "version": "0.6.1",
6
18
  "tag": "@digigov/cli-build_v0.6.1",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Change Log - @digigov/cli-build
2
2
 
3
- This log was last generated on Wed, 02 Feb 2022 15:44:29 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 03 Feb 2022 15:47:05 GMT and should not be manually modified.
4
+
5
+ ## 0.6.2
6
+ Thu, 03 Feb 2022 15:47:05 GMT
7
+
8
+ ### Patches
9
+
10
+ - fix issue with typescript and cli build
4
11
 
5
12
  ## 0.6.1
6
13
  Wed, 02 Feb 2022 15:44:29 GMT
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  const {Command, flags} = require('@oclif/command');
2
2
  const execa = require('execa');
3
- const {resolveProject, DigigovCommand} = require('@digigov/cli/lib')
4
- const path = require('path')
5
- const fs = require('fs')
3
+ const {resolveProject, DigigovCommand} = require('@digigov/cli/lib');
4
+ const path = require('path');
5
+ const fs = require('fs');
6
6
 
7
7
  module.exports = class Build extends DigigovCommand {
8
8
  static description = 'build digigov libraries';
9
9
  static id = 'build';
10
- dirname = __dirname
10
+ dirname = __dirname;
11
11
  static examples = [
12
12
  `$ digigov build`,
13
13
  ];
@@ -16,13 +16,12 @@ module.exports = class Build extends DigigovCommand {
16
16
  subpackages: flags.boolean({char: '--subpackages'}),
17
17
  };
18
18
  static load() {return Build;}
19
- script='babel'
19
+ script = 'babel';
20
20
  async run() {
21
21
 
22
-
22
+
23
23
  const {argv, flags} = this.parse(Build);
24
24
  try {
25
-
26
25
  await this.exec('rimraf', ['dist']);
27
26
  const project = resolveProject();
28
27
  const babelArgs = [
@@ -43,11 +42,18 @@ module.exports = class Build extends DigigovCommand {
43
42
  }
44
43
  const args = argv.filter((a) => a !== '--subpackages');
45
44
  if(project.isTs) {
45
+ const tsconfigProduction = path.join(project.root, 'tsconfig.production.json');
46
+ const tsArgs = [];
47
+ if(fs.existsSync(tsconfigProduction)) {
48
+ tsArgs.push('--project', tsconfigProduction);
49
+ }
46
50
  await this.exec(
47
51
  'tsc',
48
52
  ['--emitDeclarationOnly',
49
- '--outDir',
50
- 'dist']
53
+ '--outDir',
54
+ 'dist',
55
+ ...tsArgs,
56
+ ]
51
57
  );
52
58
  if(fs.existsSync(path.join(distDir, basename))) {
53
59
  const typesIncluded = fs.readdirSync(path.join(distDir));
@@ -75,7 +81,7 @@ module.exports = class Build extends DigigovCommand {
75
81
  BABEL_PUBLISH: 'true',
76
82
  }, stdio: 'inherit'
77
83
  });
78
- await execa('node', [ path.join(__dirname, 'copy-files.js')], {
84
+ await execa('node', [path.join(__dirname, 'copy-files.js')], {
79
85
  env: {},
80
86
  stdio: 'inherit',
81
87
  });
@@ -86,7 +92,7 @@ module.exports = class Build extends DigigovCommand {
86
92
  BABEL_PUBLISH: 'true',
87
93
  }, stdio: 'inherit'
88
94
  });
89
- return proc
95
+ return proc;
90
96
  } catch(err) {
91
97
  console.log(err);
92
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/cli-build",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Build plugin for Digigov CLI",
5
5
  "main": "./index.js",
6
6
  "author": "GRNET Devs <devs@lists.grnet.gr>",