-
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.
- Loading branch information
1 parent
9ba7502
commit bffe5bf
Showing
2 changed files
with
77 additions
and
0 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,67 @@ | ||
# vueify-extract-css [![stability][0]][1] | ||
|
||
Looks up `require('vueify-insert-css')` calls to extract CSS from a browserify bundle | ||
to a file. | ||
|
||
## Command line | ||
```sh | ||
$ browserify -t vueify -p [ vueify-extract-css -o bundle.css ] index.js \ | ||
-o bundle.js | ||
``` | ||
|
||
## JS api | ||
```js | ||
const browserify = require('browserify') | ||
|
||
browserify() | ||
.transform('vueify') | ||
.plugin('vueify-extract-css', { out: 'bundle.css' }) | ||
.bundle() | ||
``` | ||
|
||
```js | ||
const browserify = require('browserify') | ||
|
||
browserify() | ||
.transform('vueify') | ||
.plugin('vueify-extract-css', { out: createWriteStream }) | ||
.bundle() | ||
|
||
function createWriteStream () { | ||
return process.stdout | ||
} | ||
``` | ||
|
||
## Laravel Elixir | ||
In your gulpfile, along with laravel-elixir-vueify: | ||
```js | ||
var elixir = require('laravel-elixir'); | ||
require('laravel-elixir-vueify'); | ||
|
||
elixir.config.js.browserify.plugins.push({ | ||
name: 'vueify-extract-css', | ||
options: { | ||
out: 'path/to/extracted/css' | ||
} | ||
}); | ||
``` | ||
|
||
|
||
## Options | ||
- `-o` / `--out`: specify an outfile, defaults to `bundle.css`. Can also be a | ||
function that returns a writable stream from the JavaScript API. | ||
|
||
## Installation | ||
```sh | ||
$ npm install vueify-extract-css | ||
``` | ||
|
||
## See Also | ||
- [vueify](https://github.com/vuejs/vueify) | ||
- [insert-css](https://github.com/substack/insert-css) | ||
|
||
## License | ||
[MIT](https://tldrlegal.com/license/mit-license) | ||
|
||
[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square | ||
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index |
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 |
---|---|---|
|
@@ -6,6 +6,16 @@ | |
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository" : "rawcreative/vueify-extract-css", | ||
"keywords" : [ | ||
"vueify", | ||
"extract-css", | ||
"css", | ||
"extract", | ||
"browserify", | ||
"plugin", | ||
"transform" | ||
], | ||
"author": "T. Debo <[email protected]>", | ||
"license": "MIT", | ||
"dependencies": { | ||
|