@ws-ui/vite-plugins 1.8.2 → 1.8.5

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,27 +1,27 @@
1
1
  import { rmSync, readdirSync, statSync, existsSync } from 'node:fs';
2
- import path from 'node:path';
2
+ import { join } from 'node:path';
3
3
  export default function excludeFilesPlugin(config) {
4
4
  return {
5
5
  name: 'exclude-files',
6
6
  closeBundle() {
7
7
  const out = process.env.VITE_BUILD_TARGET || '';
8
- const baseDir = path.join(process.cwd(), out);
8
+ const baseDir = join(process.cwd(), out);
9
9
  // Remove exclude files/folders outside of all rule targets
10
10
  const ruleTargets = config.rules.map((r) => r.target.replace(/\/$/, ''));
11
11
  for (const name of readdirSync(baseDir)) {
12
12
  if (ruleTargets.includes(name))
13
13
  continue; // skip target folders
14
14
  if (config.exclude.includes(name)) {
15
- rmSync(path.join(baseDir, name), { recursive: true, force: true });
15
+ rmSync(join(baseDir, name), { recursive: true, force: true });
16
16
  }
17
17
  }
18
18
  // Apply each rule: inside target folder, keep matching files, delete others
19
19
  for (const rule of config.rules) {
20
- const targetDir = path.join(baseDir, rule.target);
20
+ const targetDir = join(baseDir, rule.target);
21
21
  if (!existsSync(targetDir))
22
22
  continue;
23
23
  for (const file of readdirSync(targetDir)) {
24
- const fp = path.join(targetDir, file);
24
+ const fp = join(targetDir, file);
25
25
  if (statSync(fp).isDirectory()) {
26
26
  rmSync(fp, { recursive: true, force: true });
27
27
  continue;
@@ -2,7 +2,7 @@ import * as fs from 'fs';
2
2
  export default function standaloneEditorPlugin() {
3
3
  let config;
4
4
  let cssContent = '';
5
- const name = 'standaline-editor-plugin';
5
+ const name = 'standalone-editor-plugin';
6
6
  const standaloneCssPath = '@ws-ui/webform-editor/dist/standalone.css';
7
7
  return {
8
8
  name,
@@ -25,7 +25,6 @@ export default function standaloneEditorPlugin() {
25
25
  if (resolved && fs.existsSync(resolved)) {
26
26
  // Read the content of the CSS file
27
27
  cssContent = fs.readFileSync(resolved, 'utf-8');
28
- console.log(`[${name}] Successfully read CSS content from: ${resolved}`);
29
28
  }
30
29
  else {
31
30
  console.error(`[${name}] Could not resolve or find the CSS file: ${standaloneCssPath}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ws-ui/vite-plugins",
3
- "version": "1.8.2",
3
+ "version": "1.8.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",