@toptal/davinci-bootstrap 3.1.22-alpha-fx-2755-codebase-specific-workflows.20 → 3.1.22
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/package.json +6 -7
- package/src/commands/new.js +0 -1
- package/src/constants.js +1 -7
- package/src/utils/skeleton.js +2 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/davinci-bootstrap",
|
|
3
|
-
"version": "3.1.22
|
|
3
|
+
"version": "3.1.22",
|
|
4
4
|
"description": "Creates application from davinci template",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -34,14 +34,13 @@
|
|
|
34
34
|
"url": "https://github.com/toptal/davinci/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@toptal/davinci-cli-shared": "1.5.2
|
|
38
|
-
"@toptal/davinci-skeleton": "7.0.
|
|
39
|
-
"@toptal/davinci-skeleton-lib": "0.1.
|
|
40
|
-
"@toptal/davinci-skeleton-sub-app": "1.2.
|
|
37
|
+
"@toptal/davinci-cli-shared": "1.5.2",
|
|
38
|
+
"@toptal/davinci-skeleton": "7.0.0",
|
|
39
|
+
"@toptal/davinci-skeleton-lib": "0.1.1",
|
|
40
|
+
"@toptal/davinci-skeleton-sub-app": "1.2.0",
|
|
41
41
|
"find-yarn-workspace-root": "^2.0.0",
|
|
42
42
|
"fs-extra": "^9.0.1",
|
|
43
43
|
"lodash.kebabcase": "^4.1.1",
|
|
44
44
|
"ora": "^5.4.1"
|
|
45
|
-
}
|
|
46
|
-
"gitHead": "b2bc74b6947156d1489a42f820be1832f53b870d"
|
|
45
|
+
}
|
|
47
46
|
}
|
package/src/commands/new.js
CHANGED
|
@@ -40,7 +40,6 @@ const copyApplicationSkeleton = async (destDir, currentDavinciRunningDir) => {
|
|
|
40
40
|
|
|
41
41
|
try {
|
|
42
42
|
await skeleton.copyAllFiles(appDir, destDir)
|
|
43
|
-
await skeleton.copySPAWorkflows(appDir, destDir)
|
|
44
43
|
await skeleton.copyNpmrc(destDir)
|
|
45
44
|
await skeleton.copyTemplatePackageJsonFile(destDir)
|
|
46
45
|
await skeleton.copyTemplateGitIgnoreFile(destDir)
|
package/src/constants.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
const NODE_MODULES_PATTERN = /skeleton\/node_modules/g
|
|
2
2
|
const CHANGELOG_PATTERN = /CHANGELOG.md/g
|
|
3
|
-
const GITHUB_SKELETON_PATTERN = /.github\/codebase-specific-workflows/g
|
|
4
3
|
const APPS_PATH = 'apps'
|
|
5
4
|
const LIBS_PATH = 'libs'
|
|
6
5
|
const NAMESPACES_PATH = 'namespaces'
|
|
7
|
-
const GITHUB_PATH = '.github'
|
|
8
|
-
const CODEBASE_SPECIFIC_WORKFLOWS_PATH = 'codebase-specific-workflows'
|
|
9
6
|
|
|
10
7
|
module.exports = {
|
|
11
8
|
NODE_MODULES_PATTERN,
|
|
12
9
|
CHANGELOG_PATTERN,
|
|
13
|
-
GITHUB_SKELETON_PATTERN,
|
|
14
10
|
APPS_PATH,
|
|
15
11
|
LIBS_PATH,
|
|
16
|
-
NAMESPACES_PATH
|
|
17
|
-
GITHUB_PATH,
|
|
18
|
-
CODEBASE_SPECIFIC_WORKFLOWS_PATH
|
|
12
|
+
NAMESPACES_PATH
|
|
19
13
|
}
|
package/src/utils/skeleton.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
const path = require('path')
|
|
2
2
|
const fs = require('fs-extra')
|
|
3
3
|
|
|
4
|
-
const {
|
|
5
|
-
NODE_MODULES_PATTERN,
|
|
6
|
-
CHANGELOG_PATTERN,
|
|
7
|
-
GITHUB_SKELETON_PATTERN,
|
|
8
|
-
GITHUB_PATH,
|
|
9
|
-
CODEBASE_SPECIFIC_WORKFLOWS_PATH
|
|
10
|
-
} = require('../constants')
|
|
4
|
+
const { NODE_MODULES_PATTERN, CHANGELOG_PATTERN } = require('../constants')
|
|
11
5
|
|
|
12
6
|
const readPackageJson = folder => {
|
|
13
7
|
const packageJsonFile = path.join(folder, 'package.json')
|
|
@@ -61,23 +55,9 @@ const copyNpmrc = async folder => {
|
|
|
61
55
|
}
|
|
62
56
|
}
|
|
63
57
|
|
|
64
|
-
const copySPAWorkflows = async (sourceDir, destDir) => {
|
|
65
|
-
const workflowsDir = path.join(
|
|
66
|
-
sourceDir,
|
|
67
|
-
GITHUB_PATH,
|
|
68
|
-
CODEBASE_SPECIFIC_WORKFLOWS_PATH,
|
|
69
|
-
'spa'
|
|
70
|
-
)
|
|
71
|
-
const targetDir = path.join(destDir, GITHUB_PATH, 'workflows')
|
|
72
|
-
|
|
73
|
-
await fs.copy(workflowsDir, targetDir)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
58
|
const copyAllFiles = async (sourceDir, destDir) => {
|
|
77
59
|
const isSkeletonFile = src =>
|
|
78
|
-
!src.match(NODE_MODULES_PATTERN) &&
|
|
79
|
-
!src.match(CHANGELOG_PATTERN) &&
|
|
80
|
-
!src.match(GITHUB_SKELETON_PATTERN)
|
|
60
|
+
!src.match(NODE_MODULES_PATTERN) && !src.match(CHANGELOG_PATTERN)
|
|
81
61
|
|
|
82
62
|
await fs.copy(sourceDir, destDir, { filter: isSkeletonFile })
|
|
83
63
|
}
|
|
@@ -89,6 +69,5 @@ module.exports = {
|
|
|
89
69
|
copyTemplateGitIgnoreFile,
|
|
90
70
|
copyTemplateEslintrc,
|
|
91
71
|
copyNpmrc,
|
|
92
|
-
copySPAWorkflows,
|
|
93
72
|
copyAllFiles
|
|
94
73
|
}
|