generated from anolilab/monorepo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rollup-plugin-styles): new plugin for handling styles
- Loading branch information
Showing
60 changed files
with
6,392 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
dist | ||
node_modules | ||
coverage | ||
|
||
__fixtures__ | ||
__docs__ | ||
|
||
vitest.config.ts | ||
.prettierrc.cjs | ||
tsup.config.ts | ||
.secretlintrc.cjs | ||
tsconfig.eslint.json | ||
|
||
README.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/** @ts-check */ | ||
// eslint-disable-next-line import/no-commonjs,import/no-unused-modules | ||
const { defineConfig } = require("@anolilab/eslint-config/define-config"); | ||
// eslint-disable-next-line import/no-commonjs | ||
const globals = require("@anolilab/eslint-config/globals"); | ||
|
||
/// <reference types="@eslint-types/unicorn" /> | ||
/// <reference types="@eslint-types/typescript-eslint" /> | ||
/// <reference types="@eslint-types/jsdoc" /> | ||
/// <reference types="@eslint-types/import" /> | ||
/// <reference types="@eslint-types/deprecation" /> | ||
|
||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = defineConfig({ | ||
env: { | ||
// Your environments (which contains several predefined global variables) | ||
// Most environments are loaded automatically if our rules are added | ||
}, | ||
extends: ["@anolilab/eslint-config", "@anolilab/eslint-config/typescript-type-checking"], | ||
globals: { | ||
...globals.es2021, | ||
// Your global variables (setting to false means it's not allowed to be reassigned) | ||
// myGlobal: false | ||
}, | ||
ignorePatterns: ["!**/*"], | ||
overrides: [ | ||
{ | ||
files: ["*.ts", "*.tsx", "*.mts", "*.cts", "*.js", "*.jsx"], | ||
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting | ||
parserOptions: {}, | ||
rules: {}, | ||
}, | ||
{ | ||
files: ["*.ts", "*.tsx", "*.mts", "*.cts"], | ||
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting | ||
parserOptions: {}, | ||
rules: { | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-argument": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"prefer-template": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["*.js", "*.jsx"], | ||
rules: {}, | ||
}, | ||
{ | ||
files: ["*.mdx"], | ||
rules: { | ||
"jsx-a11y/anchor-has-content": "off", | ||
// @see https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/917 | ||
"jsx-a11y/heading-has-content": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["src/index.ts"], | ||
rules: { | ||
"import/no-unused-modules": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["__docs__/**"], | ||
rules: { | ||
"import/no-unresolved": "off", | ||
"import/no-unused-modules": "off", | ||
"no-console": "off", | ||
"no-undef": "off", | ||
"no-unused-vars": "off", | ||
"unicorn/prefer-top-level-await": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["__tests__/**"], | ||
rules: { | ||
"import/no-unused-modules": "off", | ||
}, | ||
}, | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
project: "./tsconfig.eslint.json", | ||
sourceType: "module", | ||
}, | ||
// Report unused `eslint-disable` comments. | ||
reportUnusedDisableDirectives: true, | ||
root: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package-lock.json | ||
|
||
src | ||
__tests__ | ||
__stories__ | ||
__fixtures__ | ||
.rpt2_cache | ||
fixup.sh | ||
.releaserc.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.gitkeep | ||
.env* | ||
*.ico | ||
*.lock | ||
dist | ||
CHANGELOG.md | ||
coverage | ||
node_modules | ||
.eslintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const config = require("@anolilab/prettier-config"); | ||
|
||
module.exports = { | ||
...config, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@anolilab/semantic-release-preset/pnpm" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.pnpm-store | ||
packages/**/node_modules | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
rules: [ | ||
{ | ||
id: "@secretlint/secretlint-rule-preset-recommend", | ||
}, | ||
], | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 visulima | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
<!-- DEPENDENCIES --> | ||
|
||
# Licenses of bundled dependencies | ||
The published @visulima/rollup-plugin-styles artifact additionally contains code with the following licenses: | ||
MIT | ||
|
||
# Bundled dependencies: | ||
## decode-uri-component | ||
License: MIT | ||
By: Sam Verschueren | ||
Repository: SamVerschueren/decode-uri-component | ||
|
||
> The MIT License (MIT) | ||
> | ||
> Copyright (c) 2017, Sam Verschueren <sam.verschueren@gmail.com> (github.com/SamVerschueren) | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
--------------------------------------- | ||
|
||
## eventemitter3 | ||
License: MIT | ||
By: Arnout Kazemier | ||
Repository: git://github.com/primus/eventemitter3.git | ||
|
||
> The MIT License (MIT) | ||
> | ||
> Copyright (c) 2014 Arnout Kazemier | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy | ||
> of this software and associated documentation files (the "Software"), to deal | ||
> in the Software without restriction, including without limitation the rights | ||
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
> copies of the Software, and to permit persons to whom the Software is | ||
> furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all | ||
> copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
> SOFTWARE. | ||
--------------------------------------- | ||
|
||
## filter-obj | ||
License: MIT | ||
By: Sindre Sorhus | ||
Repository: sindresorhus/filter-obj | ||
|
||
> MIT License | ||
> | ||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
--------------------------------------- | ||
|
||
## p-queue | ||
License: MIT | ||
Repository: sindresorhus/p-queue | ||
|
||
> MIT License | ||
> | ||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
--------------------------------------- | ||
|
||
## p-timeout | ||
License: MIT | ||
By: Sindre Sorhus | ||
Repository: sindresorhus/p-timeout | ||
|
||
> MIT License | ||
> | ||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
--------------------------------------- | ||
|
||
## query-string | ||
License: MIT | ||
By: Sindre Sorhus | ||
Repository: sindresorhus/query-string | ||
|
||
> MIT License | ||
> | ||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
--------------------------------------- | ||
|
||
## split-on-first | ||
License: MIT | ||
By: Sindre Sorhus | ||
Repository: sindresorhus/split-on-first | ||
|
||
> MIT License | ||
> | ||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com) | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
<!-- /DEPENDENCIES --> | ||
|
||
<!-- TYPE_DEPENDENCIES --> | ||
<!-- /TYPE_DEPENDENCIES --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<div align="center"> | ||
<h3>visulima rollup-plugin-styles</h3> | ||
<p> | ||
Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more | ||
</p> | ||
</div> | ||
|
||
<br /> | ||
|
||
<div align="center"> | ||
|
||
[![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] | ||
|
||
</div> | ||
|
||
--- | ||
|
||
<div align="center"> | ||
<p> | ||
<sup> | ||
Daniel Bannert's open source work is supported by the community on <a href="https://github.com/sponsors/prisis">GitHub Sponsors</a> | ||
</sup> | ||
</p> | ||
</div> | ||
|
||
--- | ||
|
||
## Install | ||
|
||
```sh | ||
npm install @visulima/rollup-plugin-styles | ||
``` | ||
|
||
```sh | ||
yarn add @visulima/rollup-plugin-styles | ||
``` | ||
|
||
```sh | ||
pnpm add @visulima/rollup-plugin-styles | ||
``` | ||
|
||
## Usage | ||
|
||
### PostCSS | ||
|
||
Install all the necessary dependencies: | ||
```sh | ||
npm install --save-dev postcss postcss-load-config postcss-modules postcss-modules-extract-imports postcss-modules-local-by-default postcss-modules-scope postcss-modules-values postcss-value-parser icss-utils | ||
``` | ||
|
||
```js | ||
|
||
## Related | ||
|
||
## Supported Node.js Versions | ||
|
||
Libraries in this ecosystem make the best effort to track [Node.js’ release schedule](https://github.com/nodejs/release#release-schedule). | ||
Here’s [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a). | ||
|
||
## Contributing | ||
|
||
If you would like to help take a look at the [list of issues](https://github.com/visulima/packem/issues) and check our [Contributing](.github/CONTRIBUTING.md) guidelines. | ||
|
||
> **Note:** please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. | ||
|
||
## Credits | ||
|
||
- [Daniel Bannert](https://github.com/prisis) | ||
- [All Contributors](https://github.com/visulima/packem/graphs/contributors) | ||
|
||
## License | ||
|
||
The visulima rollup-plugin-styles is open-sourced software licensed under the [MIT][license-url] | ||
|
||
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript | ||
[typescript-url]: "typescript" | ||
[license-image]: https://img.shields.io/npm/l/@visulima/rollup-plugin-styles?color=blueviolet&style=for-the-badge | ||
[license-url]: LICENSE.md "license" | ||
[npm-image]: https://img.shields.io/npm/v/@visulima/rollup-plugin-styles/latest.svg?style=for-the-badge&logo=npm | ||
[npm-url]: https://www.npmjs.com/package/@visulima/rollup-plugin-styles/v/latest "npm" |
Oops, something went wrong.