-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (42 loc) · 1.65 KB
/
Copy pathMakefile
File metadata and controls
51 lines (42 loc) · 1.65 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
# FlutterFlow VS Code Extension — build & publish helpers.
#
# Always build from a clean, merged `main` — the published artifact should
# match the repo's source of truth.
#
# Two ways to publish (both require membership in the `FlutterFlow` Marketplace
# publisher: https://marketplace.visualstudio.com/manage/publishers/flutterflow):
#
# 1. Manual web upload (no token needed):
# - `make package` (writes build/*.vsix)
# - Open https://marketplace.visualstudio.com/manage/publishers/flutterflow
# - Extensions tab -> "FlutterFlow: Custom Code Editor" row -> `...` -> Update
# - Drag in build/*.vsix and confirm. Version is read from package.json.
#
# 2. CLI (`make publish`): needs a Personal Access Token (Azure DevOps, scope
# Marketplace > Manage, organization "All accessible organizations").
# Provide it once with `make login`, or export VSCE_PAT in the environment.
VSCE ?= npx --yes @vscode/vsce
.PHONY: install build test package login publish clean
## install: clean install of dependencies
install:
npm ci
## build: production bundle (type-check + lint + minified esbuild)
build:
npm run package
## test: run the VS Code integration harness and the jest unit tests
test:
npm test
npx jest
## package: build a versioned .vsix into build/ (drag into the web portal, or run `make publish`)
package:
@mkdir -p build
$(VSCE) package --out build/
## login: authenticate the FlutterFlow publisher (interactive PAT prompt)
login:
$(VSCE) login FlutterFlow
## publish: publish the current package.json version to the Marketplace
publish:
$(VSCE) publish
## clean: remove build output and packaged artifacts
clean:
rm -rf dist build