https://github.com/differui/rollup-plugin-scoped
Roll and create scoped style and template.
https://github.com/differui/rollup-plugin-scoped
Last synced: 7 months ago
JSON representation
Roll and create scoped style and template.
- Host: GitHub
- URL: https://github.com/differui/rollup-plugin-scoped
- Owner: differui
- Created: 2016-04-17T10:20:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-21T06:08:54.000Z (almost 10 years ago)
- Last Synced: 2025-02-26T12:38:56.488Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
rollup-plugin-scoped
=====
Convert template and style to ES6 modules:
```js
import style form './btn.scss';
import template form './btn.tpl';
console.log(style);
console.log(template);
```
Create scoped template and style:
```js
import style form 'scoped!./btn.scss';
import template form 'scoped!./btn.tpl';
console.log(style);
console.log(template);
```
## Build-in extensions
+ style: `*.css` `*.sass` `*.scss` `*.less` `*.styl`
+ template: `*.tpl` `*.html` `*.jade`
## Installation
```bash
npm install --save-dev rollup-plugin-scoped
```
## Usage
```js
import { rollup } from 'rollup';
import scoped from 'rollup-plugin-scoped';
rollup({
entry: 'app.js',
plugins: [
scoped()
]
});
```
## License
MIT