-
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: add support of package imports for Sass (#4)
* test: add support of `node_modules` mocks * chore: run prettier in Idea * feat(sass): resolve `~<pkg>` to the `sass` field in the `package.json` * test: add tests for resolving `~<pkg>` urls in Sass files * chore: add changeset * docs: add section about Sass imports * build: update dependencies * chore: add new changeset and update an existing one * chore: enable ESlint in Idea * style: fix ESLint problems
- Loading branch information
Showing
19 changed files
with
472 additions
and
186 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,5 @@ | ||
--- | ||
'@tabula/forge': patch | ||
--- | ||
|
||
update 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,31 @@ | ||
--- | ||
'@tabula/forge': minor | ||
--- | ||
|
||
adds support of packages resolve in the Sass | ||
|
||
The `forge` resolves external packages through `~<pkg>` urls. | ||
|
||
Example: | ||
|
||
```scss | ||
@use `~@tabula/ui-theme` as theme; | ||
|
||
.root { | ||
background-color: theme.$color--primary; | ||
} | ||
``` | ||
|
||
It will search `<pkg>` in dependencies through Node.js `require`, and try to read `sass` field in the `package.json` | ||
of the founded package. | ||
|
||
Example: | ||
|
||
```json | ||
{ | ||
"name": "@tabula/ui-theme", | ||
"sass": "./sass/index.scss" | ||
} | ||
``` | ||
|
||
will be resolved to the `<node_modules>/@tabula/ui-theme/sass/index.scss`. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.