@mallardbay/cursor-rules 1.0.3 → 1.0.4
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.
- package/bin/setup-cursor.sh +8 -11
- package/package.json +1 -1
package/bin/setup-cursor.sh
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
2
|
+
# setup-cursor.sh
|
|
3
|
+
# Combine shared and env-specific MDC rules into .cursor/rules/
|
|
3
4
|
|
|
4
5
|
set -e
|
|
5
6
|
|
|
@@ -11,7 +12,8 @@ if [ -z "$ENV_TYPE" ]; then
|
|
|
11
12
|
exit 1
|
|
12
13
|
fi
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
# Ensure we resolve relative to the package location (even when used via npx)
|
|
16
|
+
SRC_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
15
17
|
SHARED_DIR="$SRC_DIR/.cursor/shared/rules"
|
|
16
18
|
ENV_DIR="$SRC_DIR/.cursor/$ENV_TYPE/rules"
|
|
17
19
|
|
|
@@ -27,13 +29,8 @@ fi
|
|
|
27
29
|
|
|
28
30
|
mkdir -p .cursor/rules
|
|
29
31
|
|
|
30
|
-
# Copy
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
done
|
|
32
|
+
# Copy shared and env-specific rules into local project
|
|
33
|
+
cp "$SHARED_DIR"/*.mdc .cursor/rules/
|
|
34
|
+
cp "$ENV_DIR"/*.mdc .cursor/rules/
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
cp "$f" .cursor/rules/
|
|
37
|
-
done
|
|
38
|
-
|
|
39
|
-
echo ".cursor/rules populated with shared and '$ENV_TYPE' rules."
|
|
36
|
+
echo ".cursor/rules setup complete for '$ENV_TYPE'."
|