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

Improve frontend-building related Makefile rules #32753

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
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ npm-update:
npm update

# Building
build-js:
build-js: build-css
npm run dev

build-js-production:
npm run build

watch-js:
npm run watch
watch-js: build-css
npm run watch &
npm run sass:watch

build-css:
npm run sass:icons

# Linting
lint-fix:
Expand Down
1 change: 1 addition & 0 deletions core/src/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,4 +332,5 @@ css += generateVariablesAliases(true)
css += '}'

// WRITE CSS
fs.mkdir('dist', (err) => { if (err) { console.info('Directory dist/ already exists') } })
fs.writeFileSync(path.join(__dirname, '../../dist', 'icons.css'), sass.compileString(css).css)
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"scripts": {
"build": "NODE_ENV=production webpack --progress --config webpack.prod.js",
"postbuild": "npm run sass && npm run sass:icons",
"dev": "NODE_ENV=development webpack --progress --config webpack.dev.js",
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.dev.js",
"lint": "eslint '**/src/**/*.{vue,js}'",
Expand Down