@cocreate/cli 1.27.2 → 1.27.4
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/CHANGELOG.md +18 -0
- package/CoCreate.config.js +3 -2
- package/docs/index.html +11 -11
- package/package.json +1 -1
- package/repositories.js +0 -4
- package/src/commands/clone.js +4 -8
- package/src/commands/fs/config.js +3 -2
- package/src/commands/fs/icon-extract.js +31 -0
- package/src/commands/other/symlinkAssets.js +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [1.27.4](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.27.3...v1.27.4) (2023-05-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update config.js and removed fontawesome ([205cc5f](https://github.com/CoCreate-app/CoCreate-cli/commit/205cc5f0fb9f1c5be903e7ec27baf55776107417))
|
|
7
|
+
|
|
8
|
+
## [1.27.3](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.27.2...v1.27.3) (2023-05-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* fullscreen target updated to fullscreen fullscreen-target ([857ec43](https://github.com/CoCreate-app/CoCreate-cli/commit/857ec434fd169cd604a92c360d2c024205992f0f))
|
|
14
|
+
* package-lock.json and pnpm-lock.yaml added to .gitignore ([eb5977b](https://github.com/CoCreate-app/CoCreate-cli/commit/eb5977b2481b8ec105d7ff21d73bc9f25bccb026))
|
|
15
|
+
* replace fontawesome with svg ([d91bada](https://github.com/CoCreate-app/CoCreate-cli/commit/d91badad896f554c416d6e67d2b1f86e7e9eccc0))
|
|
16
|
+
* replace mkdir with fs.mkdirSync ([8f001a0](https://github.com/CoCreate-app/CoCreate-cli/commit/8f001a004d106708382ad265b14410e630fdff5f))
|
|
17
|
+
* update manifest.json to manifest.webmanifest ([c89a88f](https://github.com/CoCreate-app/CoCreate-cli/commit/c89a88f72cb7e500c3341df000dc04df86731fdb))
|
|
18
|
+
|
|
1
19
|
## [1.27.2](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.27.1...v1.27.2) (2023-04-24)
|
|
2
20
|
|
|
3
21
|
|
package/CoCreate.config.js
CHANGED
|
@@ -17,9 +17,10 @@ module.exports = {
|
|
|
17
17
|
"general.cocreate.app"
|
|
18
18
|
],
|
|
19
19
|
"directory": "/docs/cli",
|
|
20
|
-
"
|
|
20
|
+
"parentDirectory": "{{parentDirectory}}",
|
|
21
|
+
"content-type": "{{content-type}}",
|
|
21
22
|
"public": "true",
|
|
22
|
-
"website_id": "
|
|
23
|
+
"website_id": "644d4bff8036fb9d1d1fd69c"
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
]
|
package/docs/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<link rel="stylesheet" href="/docs/index.css" collection="files" document_id="60888216117c640e7596303f" name="src" type="text/css" save="true" />
|
|
14
14
|
|
|
15
|
-
<link rel="manifest" href="/manifest.
|
|
15
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
|
16
16
|
</head>
|
|
17
17
|
|
|
18
18
|
<body>
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
<h2>CoCreate-cli</h2>
|
|
29
29
|
</div>
|
|
30
30
|
<div class="display:flex align-items:center font-size:20px" share-height="600" share-width="500" share-media="https://via.placeholder.com/300/09f/fff.png">
|
|
31
|
-
<a href="https://github.com/CoCreate-app/CoCreate-cli" target="_blank" class="margin-right:15px"><i class="
|
|
32
|
-
<a class="margin-right:15px share" share-network='twitter' title="Share on twitter"><i class="
|
|
33
|
-
<a class="margin-right:15px share" share-network='facebook' title="Share on Facebook"><i class="
|
|
34
|
-
<a class="margin-right:15px share" share-network='instagram' title="Share on instagram"><i class="
|
|
35
|
-
<a class="margin-right:15px share" share-network='share' title="Share on share"><i class="
|
|
31
|
+
<a href="https://github.com/CoCreate-app/CoCreate-cli" target="_blank" class="margin-right:15px"><i class="height:20px fill:#505050" src="/assets/svg/github.svg"></i></a>
|
|
32
|
+
<a class="margin-right:15px share" share-network='twitter' title="Share on twitter"><i class="height:20px fill:#505050" src="/assets/svg/twitter.svg"></i></a>
|
|
33
|
+
<a class="margin-right:15px share" share-network='facebook' title="Share on Facebook"><i class="height:20px fill:#505050" src="/assets/svg/facebook.svg"></i></a>
|
|
34
|
+
<a class="margin-right:15px share" share-network='instagram' title="Share on instagram"><i class="height:20px fill:#505050" src="/assets/svg/instagram.svg"></i></a>
|
|
35
|
+
<a class="margin-right:15px share" share-network='share' title="Share on share"><i class="height:20px fill:#505050" src="/assets/svg/share-alt.svg"></i></a>
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
38
|
<p class="max-width:500px margin:20px_10px">A headless vinilla javascript micro component. Easy configuration using HTML5 attributes or Javscript api.</h1>
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
</div>
|
|
83
83
|
|
|
84
84
|
<div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
|
|
85
|
-
<a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-target="#demo-code"><i class="
|
|
86
|
-
<a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-target="#demo-code"><i class="
|
|
87
|
-
<a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="
|
|
88
|
-
<a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><
|
|
89
|
-
<a class="margin-right:5px" fullscreen target="#playground"
|
|
85
|
+
<a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-target="#demo-code"><i class="height:18px fill:#505050" src="/assets/svg/eye.svg"></i></a>
|
|
86
|
+
<a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-target="#demo-code"><i class="height:20px fill:#505050" src="/assets/svg/eye-slash.svg"></i></a>
|
|
87
|
+
<a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="height:20px fill:#505050" src="/assets/svg/code.svg"></i></a>
|
|
88
|
+
<a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><object type="image/svg+xml" data="/assets/svg/code.svg" class="icon" height="20"></object></a>
|
|
89
|
+
<a class="margin-right:5px" fullscreen fullscreen-target="#playground"></a>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
92
92
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cli",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.4",
|
|
4
4
|
"description": "Polyrepo management bash CLI tool. Run all git commands and yarn commands on multiple repositories. Also includes a few custom macros for cloning, installing, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
package/repositories.js
CHANGED
|
@@ -322,10 +322,6 @@ module.exports = [
|
|
|
322
322
|
'path': '../../CoCreate-plugins/CoCreate-facebook',
|
|
323
323
|
'repo': 'github.com/CoCreate-app/CoCreate-facebook.git'
|
|
324
324
|
},
|
|
325
|
-
{
|
|
326
|
-
'path': '../../CoCreate-plugins/CoCreate-font-awesome',
|
|
327
|
-
'repo': 'github.com/CoCreate-app/CoCreate-font-awesome.git'
|
|
328
|
-
},
|
|
329
325
|
{
|
|
330
326
|
'path': '../../CoCreate-plugins/CoCreate-google-maps',
|
|
331
327
|
'repo': 'github.com/CoCreate-app/CoCreate-google-maps.git'
|
package/src/commands/clone.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
// const spawn = require('child_process').spawn;
|
|
2
1
|
const spawn = require('../spawn');
|
|
3
|
-
const colors = require('colors');
|
|
4
2
|
const path = require('path');
|
|
3
|
+
let fs = require('fs');
|
|
5
4
|
|
|
6
5
|
module.exports = async function gitClone(repos, args) {
|
|
7
6
|
const failed = [];
|
|
@@ -10,15 +9,12 @@ module.exports = async function gitClone(repos, args) {
|
|
|
10
9
|
for (let i = 0; i < repos.length; i++) {
|
|
11
10
|
// ToDo: Check if path exist and if git.config or package.json exist continue
|
|
12
11
|
if (cwdPath !== repos[i].absolutePath) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
failed.push({ name: repos[i].name, des: `creating directory failed` })
|
|
16
|
-
}
|
|
12
|
+
if (!fs.existsSync(repos[i].directory))
|
|
13
|
+
fs.mkdirSync(repos[i].directory);
|
|
17
14
|
|
|
18
|
-
exitCode = await spawn('git', ['clone', `https://${repos[i].repo}`], { stdio: 'inherit', cwd: repos[i].directory })
|
|
15
|
+
let exitCode = await spawn('git', ['clone', `https://${repos[i].repo}`], { stdio: 'inherit', cwd: repos[i].directory })
|
|
19
16
|
if (exitCode !== 0) {
|
|
20
17
|
failed.push({ name: repos[i].name, des: `cloning failed` })
|
|
21
|
-
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
}
|
|
@@ -43,9 +43,10 @@ function update(MdPath) {
|
|
|
43
43
|
"general.cocreate.app"
|
|
44
44
|
],
|
|
45
45
|
"directory": "/docs/${name}",
|
|
46
|
-
"
|
|
46
|
+
"parentDirectory": "{{parentDirectory}}",
|
|
47
|
+
"content-type": "{{content-type}}",
|
|
47
48
|
"public": "true",
|
|
48
|
-
"website_id": "
|
|
49
|
+
"website_id": "644d4bff8036fb9d1d1fd69c"
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
let glob = require("glob");
|
|
2
|
+
let fs = require('fs');
|
|
3
|
+
const path = require("path")
|
|
4
|
+
|
|
5
|
+
function globUpdater(er, files) {
|
|
6
|
+
console.log('ggggggggggggggggggg', files, er)
|
|
7
|
+
if (er)
|
|
8
|
+
console.log(files, 'glob resolving issue')
|
|
9
|
+
else
|
|
10
|
+
files.forEach(filename => {
|
|
11
|
+
console.log(filename, 'glob resolving issue')
|
|
12
|
+
// update(filename + '/automated.yml')
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function update(YmlPath) {
|
|
18
|
+
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).substring(9);
|
|
19
|
+
let fileContent = ``;
|
|
20
|
+
// process.exit()
|
|
21
|
+
if (fs.existsSync(YmlPath))
|
|
22
|
+
fs.unlinkSync(YmlPath)
|
|
23
|
+
fs.writeFileSync(YmlPath, fileContent)
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let pathSrc = "../../CoCreate-admin/src/**/*.html"
|
|
28
|
+
if (!fs.existsSync(pathSrc))
|
|
29
|
+
console.log('does not exist')
|
|
30
|
+
|
|
31
|
+
glob(pathSrc, globUpdater)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
|
|
3
|
+
function createSymlink(dir, dest){
|
|
4
|
+
if (!fs.existsSync(dir)) {
|
|
5
|
+
console.log('does not exist')
|
|
6
|
+
return
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
if (fs.existsSync(dest))
|
|
10
|
+
fs.unlinkSync(dest)
|
|
11
|
+
|
|
12
|
+
fs.symlink( dir, dest, 'dir', (err) => {
|
|
13
|
+
if (err)
|
|
14
|
+
console.log(err);
|
|
15
|
+
else {
|
|
16
|
+
console.log("symlink added");
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
// createSymlink('./assets', '../../assets')
|
|
24
|
+
createSymlink('./manifest.webmanifest', '../../manifest.webmanifest')
|
|
25
|
+
createSymlink('./sw.js', '../../sw.js')
|
|
26
|
+
createSymlink('./offline.html', '../../offline.html')
|