@cocreate/cli 1.35.1 → 1.36.0
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 +24 -0
- package/CoCreate.config.js +2 -19
- package/docs/index.html +18 -18
- package/package.json +3 -3
- package/src/commands/fs/config.js +11 -11
- package/src/commands/other/symlinkPwa.js +16 -4
- package/webpack.config.js +79 -73
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# [1.36.0](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.35.2...v1.36.0) (2023-08-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* comment out creating pwa symlink in admin and website ([03231cc](https://github.com/CoCreate-app/CoCreate-cli/commit/03231cca9a699cf207d5773538fd9d0d5f7c2c92))
|
|
7
|
+
* crud attributes renamed ([381f3a0](https://github.com/CoCreate-app/CoCreate-cli/commit/381f3a0f01fb2b816a48a5e53dd5f059a153e754))
|
|
8
|
+
* Refactored *-target to *-selector ([6b66d9a](https://github.com/CoCreate-app/CoCreate-cli/commit/6b66d9ae0ed84c52385fcea6e6a6849dc23186dd))
|
|
9
|
+
* Remove unnecessary dependencies from CoCreate.config.js ([8463408](https://github.com/CoCreate-app/CoCreate-cli/commit/8463408415aa6d13e1ebbfa6c57629adc2ecc2f6))
|
|
10
|
+
* webpack.config and package.json make use of mode=production instead of process.env ([bb6d483](https://github.com/CoCreate-app/CoCreate-cli/commit/bb6d483f062a1220417b4ed178db1d13e56740ad))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* create symlink for service worker, offline page, and manifest ([eaad236](https://github.com/CoCreate-app/CoCreate-cli/commit/eaad2369868c07293617dfb8f34e26252e75f6e9))
|
|
16
|
+
* name attribute and variable renamed to key ([3dec7ba](https://github.com/CoCreate-app/CoCreate-cli/commit/3dec7baffd61cb3200158e85f36070c00a362eb3))
|
|
17
|
+
|
|
18
|
+
## [1.35.2](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.35.1...v1.35.2) (2023-06-16)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* Update dependencies versions for [@cocreate](https://github.com/cocreate) libraries ([243fa7d](https://github.com/CoCreate-app/CoCreate-cli/commit/243fa7d2765280b0c48144b744f20a839d615fbb))
|
|
24
|
+
|
|
1
25
|
## [1.35.1](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.35.0...v1.35.1) (2023-06-16)
|
|
2
26
|
|
|
3
27
|
|
package/CoCreate.config.js
CHANGED
|
@@ -4,8 +4,8 @@ module.exports = {
|
|
|
4
4
|
"host": "",
|
|
5
5
|
"sources": [
|
|
6
6
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"array": "files",
|
|
8
|
+
"object": {
|
|
9
9
|
"_id": "637ca36250234ef1671ce30f",
|
|
10
10
|
"name": "index.html",
|
|
11
11
|
"path": "/docs/cli/index.html",
|
|
@@ -122,10 +122,6 @@ module.exports = {
|
|
|
122
122
|
'path': '../CoCreate-events',
|
|
123
123
|
'repo': 'github.com/CoCreate-app/CoCreate-events.git'
|
|
124
124
|
},
|
|
125
|
-
{
|
|
126
|
-
'path': '../CoCreate-fetch',
|
|
127
|
-
'repo': 'github.com/CoCreate-app/CoCreate-fetch.git'
|
|
128
|
-
},
|
|
129
125
|
{
|
|
130
126
|
'path': '../CoCreate-file',
|
|
131
127
|
'repo': 'github.com/CoCreate-app/CoCreate-file.git'
|
|
@@ -138,10 +134,6 @@ module.exports = {
|
|
|
138
134
|
'path': '../CoCreate-floating-label',
|
|
139
135
|
'repo': 'github.com/CoCreate-app/CoCreate-floating-label.git'
|
|
140
136
|
},
|
|
141
|
-
{
|
|
142
|
-
'path': '../CoCreate-form',
|
|
143
|
-
'repo': 'github.com/CoCreate-app/CoCreate-form.git'
|
|
144
|
-
},
|
|
145
137
|
{
|
|
146
138
|
'path': '../CoCreate-fullscreen',
|
|
147
139
|
'repo': 'github.com/CoCreate-app/CoCreate-fullscreen.git'
|
|
@@ -218,10 +210,6 @@ module.exports = {
|
|
|
218
210
|
'path': '../CoCreate-render',
|
|
219
211
|
'repo': 'github.com/CoCreate-app/CoCreate-render.git'
|
|
220
212
|
},
|
|
221
|
-
{
|
|
222
|
-
'path': '../CoCreate-render-json',
|
|
223
|
-
'repo': 'github.com/CoCreate-app/CoCreate-render-json.git'
|
|
224
|
-
},
|
|
225
213
|
{
|
|
226
214
|
'path': '../CoCreate-resize',
|
|
227
215
|
'repo': 'github.com/CoCreate-app/CoCreate-resize.git'
|
|
@@ -414,11 +402,6 @@ module.exports = {
|
|
|
414
402
|
'path': '../../CoCreate-plugins/CoCreate-twitter',
|
|
415
403
|
'repo': 'github.com/CoCreate-app/CoCreate-twitter.git'
|
|
416
404
|
},
|
|
417
|
-
{
|
|
418
|
-
'path': '../../CoCreate-plugins/CoCreate-uppy',
|
|
419
|
-
'repo': 'github.com/CoCreate-app/CoCreate-uppy.git'
|
|
420
|
-
},
|
|
421
|
-
|
|
422
405
|
|
|
423
406
|
// {
|
|
424
407
|
// 'path': '../CoCreateApi',
|
package/docs/index.html
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
sizes="32x32"
|
|
12
12
|
href="https://cocreate.app/images/favicon.ico" />
|
|
13
13
|
<meta
|
|
14
|
-
|
|
14
|
+
key="description"
|
|
15
15
|
content="A simple HTML5 and pure javascript component. Easy configuration using HTML5 attributes or Javscript api and highly styleable." />
|
|
16
16
|
<meta
|
|
17
|
-
|
|
17
|
+
key="keywords"
|
|
18
18
|
content="helper classes, utility classes, css framework, css library, inline style classes" />
|
|
19
19
|
<meta name="robots" content="index,follow" />
|
|
20
20
|
|
|
21
21
|
<link
|
|
22
22
|
rel="stylesheet"
|
|
23
23
|
href="/docs/index.css"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
array="files"
|
|
25
|
+
object="60888216117c640e7596303f"
|
|
26
|
+
key="src"
|
|
27
27
|
type="text/css"
|
|
28
28
|
save="true" />
|
|
29
29
|
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
scroll="sticky-nav,hide-nav"
|
|
38
38
|
scroll-up="10"
|
|
39
39
|
scroll-down="10"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
array="files"
|
|
41
|
+
object="60395ef42b3ac232657040fd"
|
|
42
|
+
key="src"></nav>
|
|
43
43
|
<sidenav
|
|
44
44
|
id="menuL"
|
|
45
45
|
class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
|
|
46
46
|
resizable
|
|
47
|
-
resize-
|
|
47
|
+
resize-selector="[content_id='content']"
|
|
48
48
|
resize-property="margin-left"
|
|
49
49
|
resize-value="width">
|
|
50
50
|
<menu
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
array="files"
|
|
52
|
+
object="603717b07de7fb350ae9fec8"
|
|
53
|
+
key="src"></menu>
|
|
54
54
|
<div resize="right"></div>
|
|
55
55
|
</sidenav>
|
|
56
56
|
<main
|
|
@@ -197,9 +197,9 @@
|
|
|
197
197
|
<textarea
|
|
198
198
|
type="code"
|
|
199
199
|
lang="html"
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
array="demos"
|
|
201
|
+
object=""
|
|
202
|
+
key="demo"
|
|
203
203
|
save="false"
|
|
204
204
|
id="demo"
|
|
205
205
|
class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
show="#eye-slash"
|
|
223
223
|
hide="#eye, #demo-preview"
|
|
224
224
|
toggle="code-height"
|
|
225
|
-
toggle-
|
|
225
|
+
toggle-selector="#demo-code"
|
|
226
226
|
><i
|
|
227
227
|
class="height:18px fill:#505050"
|
|
228
228
|
src="/assets/svg/eye.svg"></i
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
show="#eye, #demo-preview"
|
|
235
235
|
hide="#eye-slash"
|
|
236
236
|
toggle="code-height"
|
|
237
|
-
toggle-
|
|
237
|
+
toggle-selector="#demo-code"
|
|
238
238
|
><i
|
|
239
239
|
class="height:20px fill:#505050"
|
|
240
240
|
src="/assets/svg/eye-slash.svg"></i
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
<a
|
|
264
264
|
class="margin-right:5px"
|
|
265
265
|
fullscreen
|
|
266
|
-
fullscreen-
|
|
266
|
+
fullscreen-selector="#playground"></a>
|
|
267
267
|
</div>
|
|
268
268
|
</div>
|
|
269
269
|
<!-- End SandBox -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
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",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"coc": "src/coc.js"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@cocreate/config": "^1.0
|
|
61
|
-
"@cocreate/file": "^1.3.
|
|
60
|
+
"@cocreate/config": "^1.1.0",
|
|
61
|
+
"@cocreate/file": "^1.3.10",
|
|
62
62
|
"glob": "^7.1.7",
|
|
63
63
|
"prettier": "^2.3.2"
|
|
64
64
|
}
|
|
@@ -14,14 +14,14 @@ function globUpdater(er, files) {
|
|
|
14
14
|
|
|
15
15
|
function update(MdPath) {
|
|
16
16
|
let name = path.basename(path.resolve(path.dirname(MdPath), './')).substring(9);
|
|
17
|
-
let
|
|
17
|
+
let object = '';
|
|
18
18
|
let replaceContent = fs.readFileSync(MdPath).toString();
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
let content_source = replaceContent.substring(replaceContent.indexOf("sources"));
|
|
22
|
-
let content1 = content_source.substring(content_source.indexOf("
|
|
22
|
+
let content1 = content_source.substring(content_source.indexOf("object"));
|
|
23
23
|
let content2 = content1.substring(content1.indexOf(':'));
|
|
24
|
-
|
|
24
|
+
object = content2.substring(3, content2.indexOf(',') - 4);
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
let fileContent = `module.exports = {
|
|
@@ -33,9 +33,9 @@ function update(MdPath) {
|
|
|
33
33
|
|
|
34
34
|
"sources": [
|
|
35
35
|
{
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"_id": "${
|
|
36
|
+
"array": "files",
|
|
37
|
+
"object": {
|
|
38
|
+
"_id": "${object}",
|
|
39
39
|
"name": "index.html",
|
|
40
40
|
"path": "/docs/${name}/index.html",
|
|
41
41
|
"src": "{{./docs/index.html}}",
|
|
@@ -54,12 +54,12 @@ function update(MdPath) {
|
|
|
54
54
|
|
|
55
55
|
`;
|
|
56
56
|
|
|
57
|
-
if (!
|
|
58
|
-
console.log("
|
|
59
|
-
if (
|
|
60
|
-
console.log("
|
|
57
|
+
if (!object.length)
|
|
58
|
+
console.log("object Undefined: ", MdPath);
|
|
59
|
+
if (object.length != 24 && object.length != 0)
|
|
60
|
+
console.log("object not valid! please check your config: ", MdPath);
|
|
61
61
|
else {
|
|
62
|
-
console.log(MdPath, " ->
|
|
62
|
+
console.log(MdPath, " -> object : ", object);
|
|
63
63
|
if (fs.existsSync(MdPath))
|
|
64
64
|
fs.unlinkSync(MdPath);
|
|
65
65
|
fs.writeFileSync(MdPath, fileContent);
|
|
@@ -33,7 +33,19 @@ function createSymlink(dir, dest, option) {
|
|
|
33
33
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
symlink('./
|
|
38
|
-
symlink('./
|
|
39
|
-
symlink('./
|
|
36
|
+
|
|
37
|
+
symlink('./dist/service-worker.js', '../../service-worker.js', 'file')
|
|
38
|
+
// symlink('./dist/service-worker.js', '../../CoCreate-admin/src/service-worker.js', 'file')
|
|
39
|
+
// symlink('./dist/service-worker.js', '../../CoCreate-website/src/service-worker.js', 'file')
|
|
40
|
+
|
|
41
|
+
symlink('./demo/offline.html', '../../offline.html', 'file')
|
|
42
|
+
// symlink('./demo/offline.html', '../../CoCreate-admin/src/offline.html', 'file')
|
|
43
|
+
// symlink('./demo/offline.html', '../../CoCreate-website/src/offline.html', 'file')
|
|
44
|
+
|
|
45
|
+
symlink('./demo/manifest.webmanifest', '../../manifest.webmanifest', 'file')
|
|
46
|
+
// symlink('./demo/manifest.webmanifest', '../../CoCreate-admin/src/manifest.webmanifest', 'file')
|
|
47
|
+
// symlink('./demo/manifest.webmanifest', '../../CoCreate-website/src/manifest.webmanifest', 'file')
|
|
48
|
+
|
|
49
|
+
// symlink('./demo/manifest-assets', '../../manifest-assets', 'dir')
|
|
50
|
+
// symlink('./demo/manifest-assets', '../../CoCreate-admin/manifest-assets', 'dir')
|
|
51
|
+
// symlink('./demo/manifest-assets', '../../CoCreate-website/manifest-assets', 'dir')
|
package/webpack.config.js
CHANGED
|
@@ -1,84 +1,90 @@
|
|
|
1
1
|
const path = require("path")
|
|
2
2
|
const TerserPlugin = require("terser-webpack-plugin")
|
|
3
3
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
|
|
4
|
-
let isProduction = process.env.NODE_ENV === "production"
|
|
5
4
|
const { CleanWebpackPlugin } = require("clean-webpack-plugin")
|
|
6
5
|
|
|
7
|
-
module.exports = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
output: {
|
|
12
|
-
path: path.resolve(__dirname, "dist"),
|
|
13
|
-
filename: isProduction ? "[name].min.js" : "[name].js",
|
|
14
|
-
libraryTarget: "umd",
|
|
15
|
-
libraryExport: "default",
|
|
16
|
-
library: ["CoCreate", "cli"],
|
|
17
|
-
globalObject: "this",
|
|
18
|
-
},
|
|
6
|
+
module.exports = (env, argv) => {
|
|
7
|
+
let isProduction = false
|
|
8
|
+
if (argv.mode === 'production')
|
|
9
|
+
isProduction = true
|
|
19
10
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
filename: "[name].css",
|
|
24
|
-
}),
|
|
25
|
-
],
|
|
26
|
-
// Default mode for Webpack is production.
|
|
27
|
-
// Depending on mode Webpack will apply different things
|
|
28
|
-
// on final bundle. For now we don't need production's JavaScript
|
|
29
|
-
// minifying and other thing so let's set mode to development
|
|
30
|
-
mode: isProduction ? "production" : "development",
|
|
31
|
-
module: {
|
|
32
|
-
rules: [
|
|
33
|
-
{
|
|
34
|
-
test: /.js$/,
|
|
35
|
-
exclude: /(node_modules)/,
|
|
36
|
-
use: {
|
|
37
|
-
loader: "babel-loader",
|
|
38
|
-
options: {
|
|
39
|
-
plugins: ["@babel/plugin-transform-modules-commonjs"],
|
|
40
|
-
},
|
|
11
|
+
const config = {
|
|
12
|
+
entry: {
|
|
13
|
+
"CoCreate-cli": "./src/index.js",
|
|
41
14
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
15
|
+
output: {
|
|
16
|
+
path: path.resolve(__dirname, "dist"),
|
|
17
|
+
filename: isProduction ? "[name].min.js" : "[name].js",
|
|
18
|
+
libraryTarget: "umd",
|
|
19
|
+
libraryExport: "default",
|
|
20
|
+
library: ["CoCreate", "cli"],
|
|
21
|
+
globalObject: "this",
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
plugins: [
|
|
25
|
+
new CleanWebpackPlugin(),
|
|
26
|
+
new MiniCssExtractPlugin({
|
|
27
|
+
filename: "[name].css",
|
|
28
|
+
}),
|
|
48
29
|
],
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
30
|
+
// Default mode for Webpack is production.
|
|
31
|
+
// Depending on mode Webpack will apply different things
|
|
32
|
+
// on final bundle. For now we don't need production's JavaScript
|
|
33
|
+
// minifying and other thing so let's set mode to development
|
|
34
|
+
mode: isProduction ? "production" : "development",
|
|
35
|
+
module: {
|
|
36
|
+
rules: [
|
|
37
|
+
{
|
|
38
|
+
test: /.js$/,
|
|
39
|
+
exclude: /(node_modules)/,
|
|
40
|
+
use: {
|
|
41
|
+
loader: "babel-loader",
|
|
42
|
+
options: {
|
|
43
|
+
plugins: ["@babel/plugin-transform-modules-commonjs"],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
test: /.css$/i,
|
|
49
|
+
use: [
|
|
50
|
+
{ loader: "style-loader", options: { injectType: "linkTag" } },
|
|
51
|
+
"file-loader",
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
52
56
|
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
// add source map
|
|
58
|
+
...(isProduction ? {} : { devtool: "eval-source-map" }),
|
|
55
59
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
optimization: {
|
|
61
|
+
minimize: true,
|
|
62
|
+
minimizer: [
|
|
63
|
+
new TerserPlugin({
|
|
64
|
+
extractComments: true,
|
|
65
|
+
// cache: true,
|
|
66
|
+
parallel: true,
|
|
67
|
+
// sourceMap: true, // Must be set to true if using source-maps in production
|
|
68
|
+
terserOptions: {
|
|
69
|
+
// https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
|
|
70
|
+
// extractComments: 'all',
|
|
71
|
+
compress: {
|
|
72
|
+
drop_console: true,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
],
|
|
77
|
+
splitChunks: {
|
|
78
|
+
chunks: "all",
|
|
79
|
+
minSize: 200,
|
|
80
|
+
// maxSize: 99999,
|
|
81
|
+
//minChunks: 1,
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
83
|
+
cacheGroups: {
|
|
84
|
+
defaultVendors: false,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
return config
|
|
90
|
+
}
|