Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move front end source files to web_src and generate index.js minify version #8440

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ npm-check:
exit 1; \
fi;

.PHONY: webpack
webpack: npm
npm install webpack -g

Copy link
Member

@silverwind silverwind Oct 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary, just run npm install --save-dev webpack which will add it as a proper dependency. To run it, use npx webpack <args> afterwards.

.PHONY: npm
npm: npm-check
npm install --no-save
Expand All @@ -429,14 +433,15 @@ npm-update: npm-check
npm install --package-lock

.PHONY: js
js: npm
npx eslint public/js
js: npm webpack
npx eslint web_src/js
webpack

.PHONY: css
css: npm
npx stylelint public/less
npx lessc --clean-css="--s0 -b" public/less/index.less public/css/index.css
$(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),npx lessc --clean-css="--s0 -b" public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
npx stylelint web_src/less
npx lessc --clean-css="--s0 -b" web_src/less/index.less public/css/index.css
$(foreach file, $(filter-out web_src/less/themes/_base.less, $(wildcard web_src/less/themes/*)),npx lessc --clean-css="--s0 -b" web_src/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
npx postcss --use autoprefixer --no-map --replace public/css/*

@diff=$$(git diff public/css/*); \
Expand Down
Loading