@nitro/exporter 9.3.2 → 9.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitro/exporter",
3
- "version": "9.3.2",
3
+ "version": "9.3.4",
4
4
  "description": "An exporting package for nitro. Generate static packages with ease.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,17 +28,18 @@
28
28
  "exporter"
29
29
  ],
30
30
  "peerDependencies": {
31
- "@nitro/app": ">=9.3.2",
32
- "@nitro/gulp": ">=9.3.2"
31
+ "@nitro/app": ">=9.3.4",
32
+ "@nitro/gulp": ">=9.3.4"
33
33
  },
34
34
  "dependencies": {
35
35
  "array-unique": "0.3.2",
36
36
  "del": "6.1.1",
37
37
  "delete-empty": "3.0.0",
38
38
  "glob": "10.4.5",
39
+ "glob-parent": "6.0.2",
39
40
  "gulp-filter": "7.0.0",
40
41
  "gulp-html-minifier-terser": "7.1.0",
41
- "gulp-vinyl-zip": "2.5.0"
42
+ "gulp-zip": "5.1.0"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@merkle-open/eslint-config": "4.0.0",
@@ -1,13 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  const del = require('del');
4
+ const deleteEmpty = require('delete-empty');
4
5
  const fs = require('fs');
5
- const path = require('path');
6
- const gulpZip = require('gulp-vinyl-zip').zip;
7
- const htmlmin = require('gulp-html-minifier-terser');
6
+ const globParent = require('glob-parent');
8
7
  const { globSync } = require('glob');
8
+ const gulpZip = require('gulp-zip');
9
+ const htmlmin = require('gulp-html-minifier-terser');
10
+ const path = require('path');
9
11
  const unique = require('array-unique');
10
- const deleteEmpty = require('delete-empty');
12
+
11
13
  const utils = require('../lib/utils.js');
12
14
 
13
15
  module.exports = function (gulp, config) {
@@ -54,7 +56,9 @@ module.exports = function (gulp, config) {
54
56
  return false;
55
57
  }
56
58
  if (typeof pattern === 'string') {
57
- src.push(pattern);
59
+ if (fs.existsSync(globParent(pattern))) {
60
+ src.push(pattern);
61
+ }
58
62
  }
59
63
  return true;
60
64
  });
@@ -68,7 +72,7 @@ module.exports = function (gulp, config) {
68
72
  getPublicsPromise = function () {
69
73
  return new Promise((resolve) =>
70
74
  gulp
71
- .src(src, { base: 'public' })
75
+ .src(src, { base: 'public', encoding: false, allowEmpty: true })
72
76
  .pipe(gulp.dest(configEntry.dest + path.sep))
73
77
  .on('end', () => {
74
78
  resolve();
@@ -96,7 +100,7 @@ module.exports = function (gulp, config) {
96
100
  * @returns {null} No return value.
97
101
  */
98
102
  function move() {
99
- gulp.src(renames[i].src, { base: renames[i].base })
103
+ gulp.src(renames[i].src, { base: renames[i].base, encoding: false, allowEmpty: true })
100
104
  .pipe(gulp.dest(renames[i].dest))
101
105
  .on('end', () => {
102
106
  del.sync(renames[i++].src);
@@ -164,7 +168,7 @@ module.exports = function (gulp, config) {
164
168
  flag: 'r',
165
169
  })
166
170
  );
167
- gulp.src(`${configEntry.dest}/**/*`)
171
+ gulp.src(`${configEntry.dest}/**/*`, { encoding: false })
168
172
  .pipe(gulpZip(`${pkg.name}-${pkg.version}.zip`))
169
173
  .pipe(gulp.dest(configEntry.dest))
170
174
  .on('end', () => {