Skip to content

A rework plugin to download and inline CSS for external source via @import

License

Notifications You must be signed in to change notification settings

rakhnin/rework-import-external

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rework-import-external Build Status

A rework plugin to download and inline CSS for external source via @import

Install

$ npm install --save rework-import-external

Usage

const rework = require('rework');
const plugin = require('rework-import-external');

let css = rework(`
@import "style1.css" (min-width: 100px);
@import "/root/path/style2.css";
@import "../style3.css";
`, {
  // base URL
  source: 'http://some.domain/base/path/'
}).use(plugin({}, (err, ast) => {
  css.toString()
}))

License

MIT © Andriy Rakhnin

About

A rework plugin to download and inline CSS for external source via @import

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published