Coder Social home page Coder Social logo

vueify-extract-css's Introduction

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

vueify-extract-css's People

Contributors

rawcreative avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vueify-extract-css's Issues

Output parameter seems to be wrong in docs

In testing the Elixir plugin, I kept getting:

Error: EISDIR: illegal operation on a directory, open '/Volumes/Data/Work/Current/2015-07 - Timeslice, Kiosk 3.0/timeslice.kiosk/public/assets/vue'

Turns out this error regards outputting to a folder, when it should be a file.

Changing this:

out: 'path/to/extracted/css'

To this:

out: 'path/to/extracted.css'

Solved the file output.

( Though the file is still empty, as noted in #1 )

Empty CSS file

Hello.

Just tried this in a vanilla gulp setup, but I get an empty CSS file, and vueify's style tag is still attached to the document's head.

Generated CSS is empty

Hi,

i really like the idea of this plugin, but i think i am missing something. The bundle.css is being generated, but it's empty. The CSS gets appended to the head for each of my Vue-Modules seperatly (like before, but it's kind of ugly, so i'd like to have just one bundled CSS File to include).

Here's my Gulpfile.js:

var elixir = require('laravel-elixir');
var gutils = require('gulp-util');

require('laravel-elixir-vueify');

process.env.NODE_ENV = 'development';
elixir.config.production = false;
elixir.config.assetsPath = "";

elixir.config.js.browserify.plugins.push({
    name: 'vueify-extract-css',
    options: {
        out: 'mybundle.css'
    }
});

if(gutils.env._.indexOf('watch') > -1) {
    elixir.config.js.browserify.plugins.push({
        name: "browserify-hmr",
        options : {
          // mode: 'fs',
          // p: 9090
        }
    });
}

elixir(function(mix) {

  mix.browserify('./_app/main.js');

});

Do you have an idea?

best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.