@iservice-dev/is-wp-plugin-kit 1.6.1 → 1.6.3

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.
@@ -126,11 +126,9 @@ export default wpPluginKitVite({
126
126
  'assets/src/l10n',
127
127
  'assets/src/legacy/js',
128
128
  'assets/src/legacy/css',
129
- 'assets/dist',
130
129
  'includes/lib/Admin',
131
130
  'includes/lib/Core',
132
131
  'includes/lib/Frontend',
133
- 'languages',
134
132
  ];
135
133
 
136
134
  // Ordner die kein .gitkeep brauchen (bekommen andere Dateien)
@@ -30,4 +30,4 @@ is-wp-plugin-kit – available commands:
30
30
  build → Production build
31
31
  compile-mo → Convert .po → .mo
32
32
  `);
33
- }
33
+ }
package/bin/utils.js CHANGED
@@ -7,20 +7,28 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
7
  /**
8
8
  * Safely copy a file from the files directory to the current working directory
9
9
  * @param {string} file - The filename to copy
10
+ * @param {string} destPath - Optional: custom destination path relative to cwd
10
11
  */
11
- export function copy(file) {
12
+ export function copy(file, destPath) {
12
13
  try {
13
14
  const src = path.resolve(__dirname, '../files', file);
14
- const dest = path.resolve(
15
- process.cwd(),
16
- file.replace(/^gitignore$/, '.gitignore')
17
- );
15
+ const dest = destPath
16
+ ? path.resolve(process.cwd(), destPath)
17
+ : path.resolve(
18
+ process.cwd(),
19
+ file.replace(/^gitignore$/, '.gitignore')
20
+ );
18
21
 
19
22
  if (!fs.existsSync(src)) {
20
23
  console.error(`Error: Source file ${file} not found.`);
21
24
  process.exit(1);
22
25
  }
23
26
 
27
+ const destDir = path.dirname(dest);
28
+ if (!fs.existsSync(destDir)) {
29
+ fs.mkdirSync(destDir, { recursive: true });
30
+ }
31
+
24
32
  fs.copyFileSync(src, dest);
25
33
  console.log(`✓ Copied ${file}`);
26
34
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iservice-dev/is-wp-plugin-kit",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "A toolkit for WordPress plugin development with Vite, TypeScript, and modern build tools",
5
5
  "type": "module",
6
6
  "main": "vite/index.js",