@nitro/exporter 11.0.0-beta.3 → 11.0.1

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": "11.0.0-beta.3",
3
+ "version": "11.0.1",
4
4
  "description": "An exporting package for nitro. Generate static packages with ease.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,14 +28,14 @@
28
28
  "exporter"
29
29
  ],
30
30
  "peerDependencies": {
31
- "@nitro/app": ">=11.0.0-beta.3",
32
- "@nitro/gulp": ">=11.0.0-beta.3"
31
+ "@nitro/app": ">=11.0.1",
32
+ "@nitro/gulp": ">=11.0.1"
33
33
  },
34
34
  "dependencies": {
35
35
  "array-unique": "0.3.2",
36
36
  "del": "8.0.1",
37
37
  "delete-empty": "3.0.0",
38
- "glob": "13.0.5",
38
+ "glob": "13.0.6",
39
39
  "glob-parent": "6.0.2",
40
40
  "gulp-filter": "9.0.1",
41
41
  "gulp-html-minifier-terser": "8.0.0",
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
- const del = (...args) => import('del').then(mod => mod.deleteAsync(...args));
3
+ const fs = require('fs/promises');
4
4
  const utils = require('../lib/utils.js');
5
5
 
6
6
  module.exports = (config) =>
7
- function () {
8
- const dest = [];
9
- utils.each(config.exporter, (entry) => {
10
- dest.push(`${entry.dest}/**/*`);
7
+ async function clean() {
8
+ await utils.each(config.exporter, async (entry) => {
9
+ await fs.rm(entry.dest, {
10
+ recursive: true,
11
+ force: true,
12
+ });
11
13
  });
12
- return del(dest);
13
14
  };
@@ -71,7 +71,7 @@ module.exports = function (gulp, config) {
71
71
  getPublicsPromise = function () {
72
72
  return new Promise((resolve) =>
73
73
  gulp
74
- .src(src, { base: 'public', encoding: false, allowEmpty: true })
74
+ .src(src, { base: 'public', encoding: false, allowEmpty: true, dot: true })
75
75
  .pipe(gulp.dest(configEntry.dest + path.sep))
76
76
  .on('end', () => {
77
77
  resolve();
@@ -99,7 +99,7 @@ module.exports = function (gulp, config) {
99
99
  * @returns {null} No return value.
100
100
  */
101
101
  function move() {
102
- gulp.src(renames[i].src, { base: renames[i].base, encoding: false, allowEmpty: true })
102
+ gulp.src(renames[i].src, { base: renames[i].base, encoding: false, allowEmpty: true, dot: true })
103
103
  .pipe(gulp.dest(renames[i].dest))
104
104
  .on('end', async () => {
105
105
  await del(renames[i++].src);
@@ -1,11 +1,11 @@
1
- const utils = require('../lib/utils.js');
2
-
3
- module.exports = async function (gulp, config) {
4
- 'use strict';
5
-
6
- const { default: filter } = await import('gulp-filter');
7
- const nitroTmpDirectory = `${config.get('nitro.tmpDirectory')}/views`;
8
- const processes = [];
1
+ const utils = require('../lib/utils.js');
2
+
3
+ module.exports = async function (gulp, config) {
4
+ 'use strict';
5
+
6
+ const { default: filter } = await import('gulp-filter');
7
+ const nitroTmpDirectory = `${config.get('nitro.tmpDirectory')}/views`;
8
+ const processes = [];
9
9
 
10
10
  utils.each(config.exporter, (configEntry) => {
11
11
  processes.push(
@@ -43,5 +43,5 @@ module.exports = async function (gulp, config) {
43
43
  );
44
44
  });
45
45
 
46
- return Promise.all(processes);
47
- };
46
+ return Promise.all(processes);
47
+ };