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

Automatically build sass and sass:icons after build #35622

Merged
merged 3 commits into from
Dec 7, 2022

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Dec 6, 2022

Since it's mandatory, make it automatic
After each npm run build the following will be executed:

  • npm run sass
  • npm run sass:icons

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
@skjnldsv skjnldsv requested review from a team, PVince81, artonge and Pytal and removed request for a team December 6, 2022 13:36
@skjnldsv skjnldsv self-assigned this Dec 6, 2022
@skjnldsv skjnldsv added the 3. to review Waiting for reviews label Dec 6, 2022
@skjnldsv skjnldsv added this to the Nextcloud 26 milestone Dec 6, 2022
@skjnldsv skjnldsv mentioned this pull request Dec 6, 2022
5 tasks
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@PVince81
Copy link
Member

PVince81 commented Dec 6, 2022

obsoletes #32753

@PVince81

This comment was marked as resolved.

@PVince81
Copy link
Member

PVince81 commented Dec 6, 2022

and the workflow that checks if assets were built

@skjnldsv
Copy link
Member Author

skjnldsv commented Dec 6, 2022

will need to adjust the compilation bot also so that it doesn't build sass stuff twice ?

Fair point.
Should not be needed anymore :)
let me adjust here

They are now included in the `postbuild` npm step

Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
They are now included in the `postbuild` npm step


Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
package.json Show resolved Hide resolved
@skjnldsv skjnldsv requested a review from szaimen December 6, 2022 14:05
@ChristophWurst
Copy link
Member

npm run sass

Is it known that this compiles the scss of all apps? It even touches the git cloned ones. Every time we build the server the independent apps will now have untracked changes.

@ChristophWurst
Copy link
Member

Is it known that this compiles the scss of all apps? It even touches the git cloned ones. Every time we build the server the independent apps will now have untracked changes.

@skjnldsv could we read shipped.json and only run scss compilation for the apps in that array? That list should always be up to date.

@skjnldsv
Copy link
Member Author

skjnldsv commented Dec 6, 2022

Is it known that this compiles the scss of all apps? It even touches the git cloned ones. Every time we build the server the independent apps will now have untracked changes.

@skjnldsv could we read shipped.json and only run scss compilation for the apps in that array? That list should always be up to date.

Nice idea! Unfortunately this is not really done at that level. We're not invoking a node script. 😞

Most of us do not have cloned apps inside the apps folder. I suggest you use apps2 or another apps config separation

@PVince81
Copy link
Member

PVince81 commented Dec 6, 2022

I ended up switching to a separate "apps-extra" when I met that issue, haven't had any other since.

A more intelligent approach could be worked on separately, if needed.

In a more general note, I wonder if we should advise people to always configure a second apps folder, it would make manual upgrades more smooth.

@skjnldsv
Copy link
Member Author

skjnldsv commented Dec 6, 2022

In a more general note, I wonder if we should advise people to always configure a second apps folder, it would make manual upgrades more smooth.

All the docker devs setups we use are using this.
But the documentation should be updated
https://docs.nextcloud.com/server/latest/developer_manual/getting_started/devenv.html#check-out-external-shipped-apps

Even for regular setups, I think we should push that forward imho
https://docs.nextcloud.com/server/latest/admin_manual/apps_management.html#using-custom-app-directories

@skjnldsv skjnldsv merged commit 741f32e into master Dec 7, 2022
@skjnldsv skjnldsv deleted the feat/auto-build-icons-sass-on-build branch December 7, 2022 09:10
@ChristophWurst
Copy link
Member

In a more general note, I wonder if we should advise people to always configure a second apps folder, it would make manual upgrades more smooth.

With the input above it sounds like this decision has already been made. Could someone please document this critical change for app developers and announce it on the forums so we can all get back to a decent dev setup?

@PVince81

This comment was marked as outdated.

@skjnldsv
Copy link
Member Author

Raised in nextcloud/standards#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants