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

[ADD] build: Introduce SCSS support #5499

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

rrahir
Copy link
Collaborator

@rrahir rrahir commented Jan 21, 2025

This commit adds the mecanics required to support scss files in the lib.

Description:

description of this task, what is implemented and why it is implemented that way.

Task: TASK_ID

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

@robodoo
Copy link
Collaborator

robodoo commented Jan 21, 2025

Pull request status dashboard

@rrahir rrahir force-pushed the master-sass-support-rar branch from 28a33c5 to 3b64687 Compare January 21, 2025 09:25
package.json Outdated
@@ -64,6 +65,7 @@
"@types/rbush": "^3.0.3",
"babel-eslint": "^10.1.0",
"body-parser": "^1.19.0",
"bundle-scss": "^1.5.4",
Copy link
Collaborator

Choose a reason for hiding this comment

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

only 733 weekly download
Is it well maintained ? If it's not used a lot, it might not be. Is doesn't really inspire trust

Copy link
Collaborator

@LucasLefevre LucasLefevre Jan 21, 2025

Choose a reason for hiding this comment

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

Looks like https://www.npmjs.com/package/scss-bundle is more wildly used, although not updated for a long time as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yup I wasn't too sure about any of those. Essentially it just bundles with a bit of logic which has no reason to change over time - I think it's kind of a "finished" product seeing the spec. I thought about doing it by hand but there seem to be some code reorganisation taking place as well and didn't want to bother too much. We could try just piping the files back to back and see how it goes?

"dev": "npm-run-all --print-label bundle:dev --parallel server serve-static watch",
"server": "node tools/server/main.cjs",
"build:js": "tsc --module es6 --incremental",
"bundle:iife": "rollup -c -m -- --format iife",
"bundle:esm": "rollup -c -m -- --format esm",
"bundle:xml": "node tools/bundle_xml/main.cjs",
"bundle:dev": "npm-run-all build:js bundle:iife \"bundle:xml -- --outDir build\"",
"dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c && npm run bundle:xml -- --outDir dist",
"bundle:dev": "npm-run-all build:js bundle:iife \"bundle:xml -- --outDir build\" && node tools/bundle_scss/main.cjs --out build/o_spreadsheet.css --cssOnly",
Copy link
Collaborator

Choose a reason for hiding this comment

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

bundling should also be done when running npm run build

@rrahir
Copy link
Collaborator Author

rrahir commented Jan 21, 2025

NOTE: before considering merging this, it will require odoo & spreadsheet-tools PR as well

This commit adds the mecanics required to support scss files in the lib.

Co-Authored-by: Lucas Lefèvre <[email protected]>
@rrahir rrahir force-pushed the master-sass-support-rar branch from 3b64687 to 55ad269 Compare January 21, 2025 09:51
@rrahir rrahir force-pushed the master-sass-support-rar branch from e53d73b to 5497444 Compare January 21, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants