Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions builders/spa.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = async function spa(folder = 'spa') {

const dir = process.cwd();
const application = require(`${dir}/.production/server`).default
const { existsSync, mkdirSync, writeFileSync, copySync, rmSync } = require('fs-extra');
const { existsSync, mkdirSync, writeFileSync, copySync, removeSync } = require('fs-extra');
const path = `${dir}/${folder}`;

async function copy(url, file) {
Expand All @@ -19,7 +19,7 @@ module.exports = async function spa(folder = 'spa') {

console.log()
if (existsSync(path)) {
rmSync(path, { recursive: true });
removeSync(path);
}
mkdirSync(path)
console.log(` ⚙️ /public/`)
Expand Down
4 changes: 2 additions & 2 deletions builders/ssg.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = async function ssg(folder = 'ssg') {
const dir = process.cwd();
const application = require(`${dir}/.production/server`).default;
const { resolve } = require('path')
const { existsSync, mkdirSync, writeFileSync, copySync, rmSync } = require('fs-extra');
const { existsSync, mkdirSync, writeFileSync, copySync, removeSync } = require('fs-extra');

function path(file = '') {
const target = file.startsWith('/') ? file.slice(1) : file;
Expand Down Expand Up @@ -85,7 +85,7 @@ module.exports = async function ssg(folder = 'ssg') {

console.log()
if (existsSync(path())) {
rmSync(path(), { recursive: true });
removeSync(path());
}
mkdirSync(path())
console.log(` ⚙️ /public/`)
Expand Down