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.
@@ -1,38 +1,48 @@
1
1
 
2
2
  const gulfileContent = `
3
- const { src, dest, series, parallel, watch } = require('gulp');
4
- const uglify = require('gulp-uglify');
5
- const cleanCss = require('gulp-clean-css');
6
- const browserSync = require('browser-sync').create();
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
- console.log('JavaScript minification ...');
17
- src('src/**/*.js')
18
- .pipe(uglify())
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
- console.log('CSS minification ...');
25
- src('src/**/*.css')
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
- exports.default = build;
45
+ export default build
36
46
 
37
47
  `;
38
48
 
@@ -15,7 +15,7 @@ const htmlContent = `
15
15
  <h1>Sinto Project</h1>
16
16
  <p>This is a default index.html file, which was created by the sin command.</p>
17
17
  </div>
18
- <script src="app.js"></script>
18
+ <script type="module" src="app.js"></script>
19
19
  </body>
20
20
  </html>
21
21
 
@@ -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-uglify": "^3.0.2"
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.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
  }