sinto 1.2.2 → 1.2.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/generators/genGulpfile.js +23 -13
- package/generators/genHtml.js +1 -1
- package/generators/genPackage.js +5 -2
- package/package.json +6 -2
|
@@ -1,38 +1,48 @@
|
|
|
1
1
|
|
|
2
2
|
const gulfileContent = `
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import {src, dest, parallel} from 'gulp';
|
|
4
|
+
import cleanCss from 'gulp-clean-css';
|
|
5
|
+
import replace from 'gulp-replace';
|
|
6
|
+
import minify from 'gulp-minify';
|
|
7
|
+
import concat from 'gulp-concat'
|
|
8
|
+
|
|
9
|
+
import {create as bsCreate} from 'browser-sync';
|
|
10
|
+
const browserSync = bsCreate();
|
|
7
11
|
|
|
8
12
|
function genHTML(cb) {
|
|
9
|
-
console.log('HTML copying...');
|
|
10
13
|
src('src/**/*.html')
|
|
14
|
+
.pipe(replace(/app.js/g, 'app-min.js'))
|
|
11
15
|
.pipe(dest('public'))
|
|
12
16
|
cb();
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
function minifyJS(cb) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.
|
|
20
|
+
src([
|
|
21
|
+
'src/**/*.js',
|
|
22
|
+
'node_modules/bootstrap/dist/js/bootstrap.js'
|
|
23
|
+
])
|
|
24
|
+
.pipe(replace(/import .*/g, ''))
|
|
25
|
+
.pipe(replace(/export .*/g, ''))
|
|
26
|
+
.pipe(concat('app.js'))
|
|
27
|
+
.pipe(minify())
|
|
19
28
|
.pipe(dest('public'));
|
|
20
29
|
cb();
|
|
21
30
|
}
|
|
22
|
-
|
|
31
|
+
|
|
23
32
|
function minifyCSS(cb) {
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
src([
|
|
34
|
+
'src/**/*.css',
|
|
35
|
+
'node_modules/bootstrap/dist/css/bootstrap.css'])
|
|
26
36
|
.pipe(cleanCss())
|
|
27
37
|
.pipe(dest('public'));
|
|
28
38
|
cb();
|
|
29
39
|
}
|
|
30
|
-
|
|
40
|
+
|
|
31
41
|
function build(cb) {
|
|
32
42
|
parallel(genHTML, minifyJS, minifyCSS)(cb);
|
|
33
43
|
}
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
export default build
|
|
36
46
|
|
|
37
47
|
`;
|
|
38
48
|
|
package/generators/genHtml.js
CHANGED
package/generators/genPackage.js
CHANGED
|
@@ -15,8 +15,11 @@ const packageContent =
|
|
|
15
15
|
"browser-sync": "^3.0.2",
|
|
16
16
|
"gulp": "^5.0.0",
|
|
17
17
|
"gulp-clean-css": "^4.3.0",
|
|
18
|
-
"gulp-
|
|
19
|
-
|
|
18
|
+
"gulp-concat": "^2.6.1",
|
|
19
|
+
"gulp-minify": "^3.1.0",
|
|
20
|
+
"gulp-replace": "^1.1.4"
|
|
21
|
+
},
|
|
22
|
+
"type": "module"
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
module.exports = packageContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sinto",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Website project development manager",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sin": "sin.js"
|
|
@@ -20,5 +20,9 @@
|
|
|
20
20
|
"web",
|
|
21
21
|
"project",
|
|
22
22
|
"minify"
|
|
23
|
-
]
|
|
23
|
+
],
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/andteki/sinto.git"
|
|
27
|
+
}
|
|
24
28
|
}
|