-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Conversation
5298946
to
a930fef
Compare
Makefile
Outdated
watch-js: build-css | ||
npm run watch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
watch-js: build-css | |
npm run watch | |
watch-js: build-css | |
npm run watch & | |
npm run sass:watch |
Should make it possible to watch both at the same time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind though that I don't run the npm run sass
commmand because it gives me errors here (see my message on Talk)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've made the requested change
f9c874e
to
a499a41
Compare
I don't think the drone failure is due to my changes |
I think we should add the sass commands as a postbuild step instead ? |
I don't understand your comment :-( |
https://docs.npmjs.com/cli/v8/using-npm/scripts#pre--post-scripts "scripts": {
"build": "NODE_ENV=production webpack --progress --config webpack.prod.js",
"postbuild": "npm run sass && npm run sass:icons",
"sass": "sass --load-path core/css core/css/ apps/*/css",
"sass:icons": "babel-node core/src/icons.js"
} |
I've lost quite some time believing this was already merged and kept compiling and trying different node versions. Anyway, we should push this forward fast because others might bump into the same issues. |
the dist/icons.css file. Updates the core/src/icons.js script to allow it to run before 'npm run dev', 'npm run build', or 'npm run watch' is run. Signed-off-by: Cyrille Bollu <[email protected]>
Signed-off-by: Vincent Petry <[email protected]>
a499a41
to
f554c33
Compare
I've rebased this and added the post-build step next up:
|
tested locally, while it does run those commands, there's another separate issue: in README we tell people to run "make build-js-production" and now that would include those commands. however the scss commands are also exploring the non-core apps and displaying errors for me locally, so nothing gets built. I think we should also limit the scss commands to the apps that are part of the core repo. Thoughts ? |
for reference, this is the local output on my setup:
|
Ah, maybe you've find out why this command has never been included in the building scripts in the first place; It looks quite difficult to solve efficiently (ie: maintaining a list of core apps). If we are to update the README file, I would prefer to remove the command from the build script altogether and update the README file with something along the line:
And create the corresponding Makefile rule. |
Yes, because you are cloning foreign apps into your server/apps folder |
yes, I've switched to "apps-extra" since, maybe need to add a note about this in the README so other people don't get surprised |
closing in favor of #35622 which uses pure npm approach of post-build |
Currently it's necessary to run
npm run sass:icons
in addition tomake dev-setup
andmake build-js
, to have the icons on your development server.This PR improves the frontend-building related Makefile rules to make this additional manual action unneeded anymore
Signed-off-by: Cyrille Bollu [email protected]