-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (67 loc) · 2.57 KB
/
Copy pathMakefile
File metadata and controls
79 lines (67 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
.PHONY: all clean install build lint lint-fix test package publish
# Default target
all: install clean build lint package
# Remove build artifacts
clean:
@echo "[$(shell date)] Cleaning build artifacts..."
@rm -rf out/ *.vsix
@echo "[$(shell date)] Clean completed."
# Install dependencies
install:
@echo "[$(shell date)] Installing dependencies..."
@npm install
@echo "[$(shell date)] Dependencies installed."
vscode-install:
@echo "[$(shell date)] Installing modules into VS Code..."
@code --install-extension ./5250script-1.0.0.vsix || { \
echo "VS Code CLI not found or installation failed."; \
echo "Please manually install the extension by:"; \
echo "1. Opening VS Code"; \
echo "2. Going to Extensions (Ctrl+Shift+X)"; \
echo "3. Clicking the '...' menu and selecting 'Install from VSIX...'"; \
echo "4. Selecting the file: ./5250script-1.0.0.vsix"; \
echo "Or copy the VSIX file to your VS Code extensions directory:"; \
echo "~/.vscode/extensions/"; \
}
cursor-install:
@echo "[$(shell date)] Installing modules into Cursor..."
@cursor --install-extension ./5250script-1.0.0.vsix || { \
echo "Cursor CLI not found or installation failed."; \
echo "Please manually install the extension by:"; \
echo "1. Opening Cursor"; \
echo "2. Going to Extensions (Ctrl+Shift+X)"; \
echo "3. Clicking the '...' menu and selecting 'Install from VSIX...'"; \
echo "4. Selecting the file: ./5250script-1.0.0.vsix"; \
echo "Or copy the VSIX file to your Cursor extensions directory:"; \
echo "~/.cursor/extensions/"; \
}
# Compile TypeScript
build:
@echo "[$(shell date)] Compiling TypeScript..."
@npm run compile
@echo "[$(shell date)] Build completed."
# Run lint checks
lint:
@echo "[$(shell date)] Running ESLint..."
@npx eslint src --ext .ts || echo "Linting completed with warnings."
@echo "[$(shell date)] Lint completed."
# Run lint checks and fix issues
lint-fix:
@echo "[$(shell date)] Running ESLint with auto-fix..."
@npx eslint src --ext .ts --fix
@echo "[$(shell date)] Lint-fix completed."
# Run tests (if you add test framework like jest/mocha)
test:
@echo "[$(shell date)] Running tests..."
@npm test || echo "No tests configured."
@echo "[$(shell date)] Tests completed."
# Package extension into .vsix
package: build
@echo "[$(shell date)] Packaging VS Code extension..."
@npx @vscode/vsce package
@echo "[$(shell date)] Package created."
# Publish extension to VS Code Marketplace (requires VSCE_PAT env var)
publish: build
@echo "[$(shell date)] Publishing extension..."
@npx @vscode/vsce publish
@echo "[$(shell date)] Publish completed."