mirror of
https://github.com/lowdefy/lowdefy.git
synced 2024-12-09 05:41:08 +08:00
fix: Remove copy plugins folder functionality
This commit is contained in:
parent
4dbd286451
commit
6c5e35f68d
@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import addCustomPluginsAsDeps from '../../utils/addCustomPluginsAsDeps.js';
|
||||
import copyPluginsFolder from '../../utils/copyPluginsFolder.js';
|
||||
import getServer from '../../utils/getServer.js';
|
||||
import installServer from '../../utils/installServer.js';
|
||||
import readDotEnv from '../../utils/readDotEnv.js';
|
||||
@ -27,7 +26,6 @@ async function build({ context }) {
|
||||
readDotEnv(context);
|
||||
const directory = context.directories.server;
|
||||
await getServer({ context, packageName: '@lowdefy/server', directory });
|
||||
await copyPluginsFolder({ context, directory });
|
||||
await addCustomPluginsAsDeps({ context, directory });
|
||||
await installServer({ context, directory });
|
||||
await runLowdefyBuild({ context, directory });
|
||||
|
@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import addCustomPluginsAsDeps from '../../utils/addCustomPluginsAsDeps.js';
|
||||
import copyPluginsFolder from '../../utils/copyPluginsFolder.js';
|
||||
import installServer from '../../utils/installServer.js';
|
||||
import runDevServer from './runDevServer.js';
|
||||
import getServer from '../../utils/getServer.js';
|
||||
@ -24,7 +23,6 @@ async function dev({ context }) {
|
||||
const directory = context.directories.dev;
|
||||
context.print.info('Starting development server.');
|
||||
await getServer({ context, packageName: '@lowdefy/server-dev', directory });
|
||||
await copyPluginsFolder({ context, directory });
|
||||
await addCustomPluginsAsDeps({ context, directory });
|
||||
await installServer({ context, directory });
|
||||
context.sendTelemetry();
|
||||
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { cleanDirectory, copyDirectory } from '@lowdefy/node-utils';
|
||||
|
||||
async function copyPluginsFolder({ context, directory }) {
|
||||
if (context.directories.config === directory) return;
|
||||
if (!fs.existsSync(path.join(context.directories.config, 'plugins'))) return;
|
||||
|
||||
await cleanDirectory(path.join(directory, 'plugins'));
|
||||
await copyDirectory(
|
||||
path.join(context.directories.config, 'plugins'),
|
||||
path.join(directory, 'plugins'),
|
||||
{
|
||||
filter: (path) => !path.includes('node_modules'),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export default copyPluginsFolder;
|
Loading…
Reference in New Issue
Block a user