Skip to content

Commit 5cf241b

Browse files
lunnydas7pad
andauthored
Use npm to manage fomantic and only build needed components (#9561)
* Use npm to manage fomantic * Only build needed semantic components * Fix make * Don't import fonts from google sites since we have loaded * [misc] devendor fomantic-ui and rebuild upon src or config changes only Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * Change sort alphabetically of semantic components * Fix trailing slash * fix makefile * Remove dependency to gulp from package.json * Fix something * Simplife the makefile * add missed fomantic compnent Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
1 parent e7322a1 commit 5cf241b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+10402
-113452
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ coverage.all
6969
/yarn.lock
7070
/public/js
7171
/public/css
72+
/public/fomantic
7273

7374
# Snapcraft
7475
snap/.snapcraft/

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/tem
5555

5656
JS_DEST_DIR := public/js
5757
CSS_DEST_DIR := public/css
58+
FOMANTIC_DEST_DIR := public/fomantic
5859

5960
TAGS ?=
6061

@@ -138,7 +139,7 @@ node-check:
138139

139140
.PHONY: clean-all
140141
clean-all: clean
141-
rm -rf $(JS_DEST_DIR) $(CSS_DEST_DIR)
142+
rm -rf $(JS_DEST_DIR) $(CSS_DEST_DIR) $(FOMANTIC_DEST_DIR)
142143

143144
.PHONY: clean
144145
clean:
@@ -474,14 +475,21 @@ npm-update: node-check node_modules
474475
npm install --package-lock
475476

476477
.PHONY: js
477-
js: node-check $(JS_DEST)
478+
js: node-check fomantic $(JS_DEST)
478479

479480
$(JS_DEST): node_modules $(JS_SOURCES)
480481
npx eslint web_src/js webpack.config.js
481482
npx webpack
482483

484+
.PHONY: fomantic
485+
fomantic: node-check $(FOMANTIC_DEST_DIR)
486+
487+
$(FOMANTIC_DEST_DIR): node_modules semantic.json web_src/fomantic/theme.config.less
488+
cp web_src/fomantic/theme.config.less node_modules/fomantic-ui/src/theme.config
489+
npx gulp -f node_modules/fomantic-ui/gulpfile.js build
490+
483491
.PHONY: css
484-
css: node-check $(CSS_DEST)
492+
css: node-check fomantic $(CSS_DEST)
485493

486494
$(CSS_DEST): node_modules $(CSS_SOURCES)
487495
npx stylelint web_src/less

0 commit comments

Comments
 (0)