@digigov/cli-app 1.0.0-rc.1 → 1.0.0-rc.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.
- package/index.js +7 -7
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const {flags} = require('@oclif/command')
|
|
1
|
+
const { flags } = require('@oclif/command')
|
|
2
2
|
const execa = require('execa')
|
|
3
3
|
const fs = require('fs')
|
|
4
|
-
const {resolveProject, makeConfig, DigigovCommand} = require('@digigov/cli/lib')
|
|
4
|
+
const { resolveProject, makeConfig, DigigovCommand } = require('@digigov/cli/lib')
|
|
5
5
|
const path = require('path');
|
|
6
6
|
const yargs = require('yargs');
|
|
7
7
|
const execConfig = { env: {}, stdio: 'inherit' }
|
|
@@ -12,14 +12,14 @@ module.exports = class App extends DigigovCommand {
|
|
|
12
12
|
static examples = [
|
|
13
13
|
`$ digigov app`,
|
|
14
14
|
]
|
|
15
|
-
dirname=__dirname
|
|
15
|
+
dirname = __dirname
|
|
16
16
|
static load() { return App }
|
|
17
17
|
script = 'next'
|
|
18
18
|
async run() {
|
|
19
19
|
const [command, ...args] = this.argv;
|
|
20
20
|
let proc;
|
|
21
21
|
const project = resolveProject();
|
|
22
|
-
switch(command){
|
|
22
|
+
switch (command) {
|
|
23
23
|
case 'export':
|
|
24
24
|
await this.exec('rimraf', ['out'])
|
|
25
25
|
await this.exec(this.script, ['build'])
|
|
@@ -43,7 +43,7 @@ module.exports = class App extends DigigovCommand {
|
|
|
43
43
|
proc = this.exec(this.script, [command, ...args], execConfig);
|
|
44
44
|
break;
|
|
45
45
|
case 'test':
|
|
46
|
-
const
|
|
46
|
+
const test_args = yargs
|
|
47
47
|
.option('init', {
|
|
48
48
|
alias: 'i',
|
|
49
49
|
describe: 'Initialize project with specified parameters'
|
|
@@ -60,8 +60,8 @@ module.exports = class App extends DigigovCommand {
|
|
|
60
60
|
.help()
|
|
61
61
|
.argv;
|
|
62
62
|
|
|
63
|
-
if (
|
|
64
|
-
const { baseUrl, pagesPath } =
|
|
63
|
+
if (test_args.init) {
|
|
64
|
+
const { baseUrl, pagesPath } = test_args;
|
|
65
65
|
console.log(`Generating test files for pagesPath "${pagesPath}" with baseUrl "${baseUrl}"`);
|
|
66
66
|
const projectFolder = process.cwd();
|
|
67
67
|
generatePagesTestFile(projectFolder, pagesPath, baseUrl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/cli-app",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
4
|
"description": "@digigov developer cli tool",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "GRNET Developers <devs@lists.grnet.gr>",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"express": "4.17.1",
|
|
11
11
|
"http-proxy-middleware": "1.0.3",
|
|
12
12
|
"next-images": "1.3.0",
|
|
13
|
-
"@digigov/cli-build": "1.0.0-rc.
|
|
13
|
+
"@digigov/cli-build": "1.0.0-rc.2",
|
|
14
14
|
"url-loader": "4.1.1",
|
|
15
15
|
"next": "10.0.9",
|
|
16
16
|
"publint": "0.1.8",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"rimraf": "3.0.2",
|
|
23
23
|
"execa": "5.0.0",
|
|
24
|
-
"@digigov/cli": "1.0.0-rc.
|
|
24
|
+
"@digigov/cli": "1.0.0-rc.2",
|
|
25
25
|
"typescript": "4.2.3",
|
|
26
26
|
"@types/node": "16.6.2",
|
|
27
27
|
"@types/react": "16.9.56",
|
|
28
28
|
"autoprefixer": "10.4.16",
|
|
29
29
|
"postcss": "8.4.4",
|
|
30
|
-
"@digigov/css": "1.0.0-rc.
|
|
30
|
+
"@digigov/css": "1.0.0-rc.2",
|
|
31
31
|
"tailwindcss": "3.3.5"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|