Skip to content

Browserify plugin to extract CSS from single-file Vue components into a separate file

License

Notifications You must be signed in to change notification settings

rawcreative/vueify-extract-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vueify-extract-css stability

Looks up require('vueify-insert-css') calls to extract CSS from a browserify bundle to a file.

Command line

$ browserify -t vueify -p [ vueify-extract-css -o bundle.css ] index.js \
  -o bundle.js

JS api

const browserify = require('browserify')

browserify()
  .transform('vueify')
  .plugin('vueify-extract-css', { out: 'bundle.css' })
  .bundle()
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:

var elixir = require('laravel-elixir');
require('laravel-elixir-vueify');

elixir.config.js.browserify.plugins.push({
    name: 'vueify-extract-css',
    options: {
		out: 'path/to/extracted/bundle.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

$ npm install vueify-extract-css

See Also

License

MIT

About

Browserify plugin to extract CSS from single-file Vue components into a separate file

Resources

License

Stars

Watchers

Forks

Packages

No packages published