Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pekim/postcss-modules-resolve-from-alias
A CSS Modules transform to provide aliases for composes paths.
https://github.com/pekim/postcss-modules-resolve-from-alias
css-modules postcss
Last synced: 3 months ago
JSON representation
A CSS Modules transform to provide aliases for composes paths.
- Host: GitHub
- URL: https://github.com/pekim/postcss-modules-resolve-from-alias
- Owner: pekim
- Created: 2015-10-31T14:42:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-06T10:50:10.000Z (about 5 years ago)
- Last Synced: 2024-10-01T14:55:39.996Z (4 months ago)
- Topics: css-modules, postcss
- Language: JavaScript
- Size: 9.77 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CSS Modules: Resolve imports from aliases
[![Build Status](https://travis-ci.org/pekim/postcss-modules-resolve-from-alias.svg?branch=master)](https://travis-ci.org/pekim/postcss-modules-resolve-from-alias)
[![NPM version](http://img.shields.io/npm/v/postcss-modules-resolve-from-alias.svg)](https://www.npmjs.org/package/postcss-modules-resolve-from-alias)With this config:
```javascript
{
'css': 'src/style'
}
```transforms:
```css
.myClass {
composes: button from "css/button.css";
color: green;
}
```into:
```css
.myClass {
composes: button from "src/style/button.css";
color: green;
}
```## Options
An object, where each key/value pair represents an alias for `composes` import paths.
- _key_ - `composes` import path prefix
- _value_ - replacement value for the import path prefixBoth keys and values may include a trailing `/`.
If there is no trailing `/`, then one is implied.## Building
```
npm install
npm build
npm test
```[![Build Status](https://travis-ci.org/pekim/postcss-modules-resolve-from-alias.svg?branch=master)](https://travis-ci.org/pekim/postcss-modules-resolve-from-alias)
* Lines: [![Coverage Status](https://coveralls.io/repos/pekim/postcss-modules-resolve-from-alias/badge.svg?branch=master&service=github)](https://coveralls.io/github/pekim/postcss-modules-resolve-from-alias?branch=master)
* Statements: [![codecov.io](http://codecov.io/github/pekim/postcss-modules-resolve-from-alias/coverage.svg?branch=master)](http://codecov.io/github/pekim/postcss-modules-resolve-from-alias?branch=master)## Development
- `npm watch` will watch `src` for changes and rebuild
- `npm autotest` will watch `src` and `test` for changes and retest## License
MIT