-
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
optimize makefile, rebuild only if files changed
- Loading branch information
Showing
4 changed files
with
430 additions
and
1,773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,34 @@ | ||
demos = monaco codemirror codemirror.next prosemirror prosemirror-versions quill | ||
|
||
all : $(demos) | ||
|
||
all : | ||
make -j demos | ||
# remove all generated files | ||
clean : | ||
rm -rf */dist */node_modules node_modules | ||
|
||
static-content : all | ||
static-content : | ||
make -j all | ||
rm -rf node_modules */node_modules | ||
|
||
demos: monaco cm cm6 pm pm-versions quill | ||
|
||
node_modules : | ||
npm ci | ||
|
||
# build demo-server | ||
demo-server : | ||
cd demo-server | ||
npm ci | ||
.PHONY demo-server | ||
|
||
# build codemirror 5 demo | ||
cm : node_modules | ||
cd codemirror | ||
npm ci | ||
npm run dist | ||
|
||
# build codemirror 6 demo | ||
cm6 : node_modules | ||
cd codemirror.next | ||
npm ci | ||
npm run dist | ||
|
||
# build prosemirror demo | ||
pm : node_modules | ||
cd prosemirror | ||
npm ci | ||
npm run dist | ||
|
||
# build prosemirror-versions demo | ||
pm-versions : node_modules | ||
cd prosemirror-versions | ||
npm ci | ||
npm run dist | ||
|
||
# build quill demo | ||
quill : node_modules | ||
cd quill | ||
npm ci | ||
npm run dist | ||
|
||
# build monaco demo | ||
monaco : node_modules | ||
cd monaco | ||
npm ci | ||
npm run dist | ||
.PHONY : monaco | ||
$(demos) : % : %/dist | ||
.PHONY : $(demos) | ||
|
||
# remove all generated files | ||
clean : | ||
rm -rf */dist */node_modules node_modules | ||
%/node_modules: %/package.json %/package-lock.json | ||
cd $* && npm ci | ||
touch $@ | ||
|
||
.NOTINTERMEDIATE: $(patsubst %,%/node_modules,$(demos)) | ||
|
||
node_modules : package.json package-lock.json | ||
-npm ci | ||
-touch node_modules | ||
|
||
.SECONDEXPANSION: | ||
%/dist : node_modules %/node_modules $$(filter-out %/dist %/node_modules,$$(wildcard $$*/*)) | ||
cd $* && npm run dist | ||
touch $@ | ||
|
||
.PHONY: serve | ||
serve : $(demos) demo-server/node_modules | ||
cd demo-server && npm start | ||
|
||
.ONESHELL : |
Oops, something went wrong.