visulima / packem

A fast and modern bundler for Node.js and TypeScript.
MIT License
3 stars 0 forks source link

feat: support css (PostCSS, Sass, Less, Stylus, Lightningcss) #28

Open prisis opened 2 weeks ago

prisis commented 2 weeks ago

Summary by CodeRabbit

coderabbitai[bot] commented 2 weeks ago

Walkthrough

The changes introduced in this pull request include the addition of multiple CSS classes across various stylesheets, each setting specific text colors. New JavaScript files have been created to implement dynamic imports of these stylesheets, enhancing modularity. Additionally, several configuration files and styles have been introduced to support code-splitting and styling functionalities within the project structure.

Changes

Files/Directories Change Summary
packages/packem/__fixtures__/auto-modules/*.css Added new CSS classes .a, .b, .c, and .global, each setting text color to red.
packages/packem/__fixtures__/code-splitting/*.scss Introduced new SCSS files and classes: .first, .fourth, .fourthtwo, .second, .third, and .thirdtwo, with various text colors specified.
packages/packem/__fixtures__/code-splitting/index.js Created a new JavaScript file that implements dynamic imports for SCSS files and logs the results.
packages/packem/__fixtures__/code-splitting/other-script.js Introduced a new JavaScript file that dynamically imports styles and logs the results.
packages/packem/__fixtures__/code-splitting/nested-script.scss Added a new CSS class .nested-script that sets the text color to rebeccapurple.
packages/packem/__fixtures__/code-splitting/nondynamic*.scss Added new CSS classes .nondynamic and .nondynamic2, applying text colors of deepskyblue and deeppink, respectively.
packages/packem/__fixtures__/modules-duplication/*.css Added new CSS classes .bar and .foo, which compose styles from shared.css.
packages/packem/__fixtures__/modules/*.css Introduced CSS classes .module and .module2, utilizing color imports and composed styles.
packages/packem/__fixtures__/named-exports/*.css Added new CSS classes .valid, .new, and .css, each with specified text colors.
packages/packem/src/commands/init.ts Updated the createInitCommand function to incorporate CSS loader options into the initialization process.
packages/packem/src/create-bundler.ts Enhanced the generateOptions function with new browser targets and CSS configuration options.
packages/packem/src/rollup/plugins/css/*.ts Introduced multiple files to enhance CSS processing, including loaders for PostCSS, Stylus, and Sass, along with utility functions and interfaces for better configuration management.

Poem

🐇 In the garden where colors bloom,
New styles emerge, dispelling the gloom.
With classes of red and shades so bright,
Our code dances joyfully, a beautiful sight!
From modules to imports, all in a row,
Let’s celebrate the changes, watch our project grow! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
github-actions[bot] commented 2 weeks ago

Thank you for following the naming conventions! 🙏

socket-security[bot] commented 2 weeks ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/less@3.0.6 None 0 12.4 kB types
npm/@types/mime-types@2.1.4 None 0 3.38 kB types
npm/@types/node-sass@4.11.7 None 0 19 kB types
npm/@types/stylus@0.48.43 None 0 49.5 kB types
npm/@types/uglifycss@0.0.11 None 0 4.77 kB types
npm/@visulima/cerebro@1.1.24 environment +2 257 kB prisis
npm/@visulima/colorize@1.4.12 None +1 500 kB prisis
npm/@visulima/find-cache-dir@1.0.14 None 0 19.5 kB prisis
npm/@visulima/fs@2.2.2 environment 0 164 kB prisis
npm/@visulima/humanizer@1.0.14 None 0 159 kB prisis
npm/@visulima/package@3.1.4 environment 0 200 kB prisis
npm/@visulima/pail@2.1.11 None +3 412 kB prisis
npm/@visulima/path@1.1.1 None 0 42.6 kB prisis
npm/@visulima/tsconfig@1.0.16 None 0 120 kB prisis
npm/autoprefixer@10.4.20 environment +3 2.4 MB ai
npm/is-ci@3.0.1 Transitive: environment +1 29.9 kB sibiraj-s
npm/mime-types@2.1.35 None +1 224 kB dougwilson

🚮 Removed packages: npm/@visulima/cerebro@1.1.23, npm/@visulima/colorize@1.4.11, npm/@visulima/find-cache-dir@1.0.13, npm/@visulima/fs@2.2.1, npm/@visulima/humanizer@1.0.13, npm/@visulima/package@3.1.3, npm/@visulima/pail@2.1.10, npm/@visulima/path@1.1.0, npm/@visulima/tsconfig@1.0.15, npm/commitizen@4.3.1, npm/conventional-changelog-conventionalcommits@8.0.0, npm/cross-env@7.0.3, npm/defu@6.1.4, npm/detect-indent@7.0.1, npm/es-module-lexer@1.5.4, npm/esbuild@0.24.0, npm/eslint-plugin-deprecation@3.0.0, npm/eslint-plugin-etc@2.0.3, npm/eslint-plugin-i@2.29.1, npm/eslint-plugin-mdx@3.1.5, npm/eslint-plugin-vitest-globals@1.5.0, npm/eslint-plugin-vitest@0.4.1, npm/eslint@8.57.0, npm/execa@9.4.0, npm/fastest-levenshtein@1.0.16, npm/hookable@5.5.3

View full report↗︎

pkg-pr-new[bot] commented 2 weeks ago

Open in Stackblitz

pnpm add https://pkg.pr.new/visulima/packem/@visulima/packem@28

commit: 3906f98

prisis commented 2 weeks ago

@coderabbitai full review

coderabbitai[bot] commented 2 weeks ago
:white_check_mark: Actions performed Full review triggered.
prisis commented 2 weeks ago

@coderabbitai summary

coderabbitai[bot] commented 2 weeks ago
:white_check_mark: Actions performed Summary regeneration triggered.
prisis commented 2 weeks ago

@coderabbitai resolve

coderabbitai[bot] commented 2 weeks ago
:white_check_mark: Actions performed Comments resolved.
prisis commented 1 week ago
prisis commented 2 hours ago

@coderabbitai resolve

coderabbitai[bot] commented 2 hours ago
:white_check_mark: Actions performed Comments resolved.
prisis commented 2 hours ago

@coderabbitai summary

coderabbitai[bot] commented 2 hours ago
:white_check_mark: Actions performed Summary regeneration triggered.