Uh oh!
There was an error while loading. Please reload this page.
Improve frontend-building related Makefile rules - #32753
Conversation
5298946 to
a930fefCompare| watch-js: build-css | ||
| npm run watch |
There was a problem hiding this comment.
| 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.
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.
Ok, I've made the requested change
f9c874e to
a499a41CompareStCyr
commented
Jun 14, 2022
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 ? |
StCyr
commented
Jun 20, 2022
I don't understand your comment :-( |
skjnldsv
commented
Jun 21, 2022
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"
} |
PVince81
commented
Jul 22, 2022
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 <cyrpub@bollu.be>
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
a499a41 to
f554c33CompareI've rebased this and added the post-build step next up:
|
PVince81
commented
Jul 22, 2022
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 ? |
PVince81
commented
Jul 22, 2022
for reference, this is the local output on my setup: |
StCyr
commented
Aug 4, 2022
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 |
PVince81
commented
Aug 10, 2022
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 |
PVince81
commented
Dec 6, 2022
closing in favor of #35622 which uses pure npm approach of post-build |
Currently it's necessary to run
npm run sass:iconsin addition tomake dev-setupandmake 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 cyrpub@bollu.be