rw-elements-tools 1.2.0 → 1.2.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.
@@ -306,7 +306,7 @@ function processNestedGlobalControls(control) {
306
306
 
307
307
  /**
308
308
  * Processes 'use' key references in a property, replacing them with
309
- * the referenced Property definition from src/properties/.
309
+ * the referenced Property definition from properties/.
310
310
  *
311
311
  * @param {Object|Array} property - The property object or array to process.
312
312
  * @returns {Object|Array} The property with 'use' keys resolved.
@@ -633,9 +633,9 @@ export async function startWatch(config) {
633
633
 
634
634
  // Allow direct execution for backwards compatibility
635
635
  if (process.argv[1] === fileURLToPath(import.meta.url)) {
636
- // Direct execution: use default path
636
+ // Direct execution: use ./packs relative to current working directory
637
637
  const WATCH = process.argv.includes('--watch') || process.argv.includes('-w');
638
- const defaultPacksDir = path.resolve(__dirname, "..", "packs");
638
+ const defaultPacksDir = path.resolve(process.cwd(), "packs");
639
639
  const config = { packsDir: defaultPacksDir };
640
640
 
641
641
  (async () => {
@@ -231,11 +231,12 @@ export async function startWatch(config) {
231
231
 
232
232
  // Allow direct execution for backwards compatibility
233
233
  if (process.argv[1] === __filename) {
234
+ // Direct execution: use ./packs relative to current working directory
234
235
  const WATCH = process.argv.includes('--watch') || process.argv.includes('-w');
235
- const defaultPacksDir = path.resolve(__dirname, '..', 'packs');
236
+ const defaultPacksDir = path.resolve(process.cwd(), 'packs');
236
237
  const config = {
237
238
  packsDir: defaultPacksDir,
238
- projectRoot: path.resolve(__dirname, '..')
239
+ projectRoot: process.cwd()
239
240
  };
240
241
 
241
242
  (async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rw-elements-tools",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Build tools for RapidWeaver Elements packs - generates properties.json and hooks.js files",
5
5
  "author": "Elements Platform",
6
6
  "license": "MIT",