0

How can I use Elixir + Vueify like the Vue-Hackernews sample?

They use some command like this at the package.json

....
"scripts": {
    "dev": "watchify -v -t vueify -e src/main.js -o build/build.js",
    "build": "./node_modules/watchify/node_modules/.bin/browserify -t vueify src/main.js | uglifyjs -c -m > build/build.js"
}
...

But I do not know how to use it with Laravel Elixir

Sample

2
  • 1
    Have you tried anything yet ? Commented Jun 11, 2015 at 18:01
  • I've tried, but I do not know how to use laravel elixir together with vueify ... for example git, he shows using browserify, and I was wondering how I use with the elixir Commented Jun 11, 2015 at 20:27

1 Answer 1

4
  1. Install sudo npm install laravel-elixir-browserify vue vueify --save
  2. In your gulpfile.js add the following:

    var elixir = require('laravel-elixir');
    
    var vueify = require('laravel-elixir-browserify').init("vueify");
    
    elixir(function(mix) {
        // resources/assets/js/main.js
        mix.vueify('main.js', {insertGlobals: true, transform: "vueify", output: "public/js"});
    });
    
  3. Be Happy =D

Laravel Elixir Browserify Extension Doc Click Here

Sign up to request clarification or add additional context in comments.

1 Comment

This worked me and I commented on an issue trying to bring vueify into existence.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.