Project

jass-vue

0.0
No commit activity in last 3 years
No release in over 3 years
Vue single file components for Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 5.0
~> 10.0

Runtime

~> 0.9.3
 Project Readme

Jass::Vue

Roll ES6 and VueJS single file components with the Rails asset pipeline - no Webpack required!

Installation

Add this line to your application's Gemfile:

gem 'jass-vue'

You need a working NodeJS installation.

Configuration

In Rails apps the location of your custom npm dependencies will be automatically set to:

Jass.vendor_modules_root = Rails.root.join('vendor')

For other frameworks, it needs to be set manually using the above method.

Usage

Use yarn to install your custom npm dependencies into vendor/node_modules. vendor/package.json and vendor/yarn.lock should be checked into source control.

Create your bundle entry points as .jass files under app/assets/javascripts in regular ES6 syntax (import, async/await).

External dependencies can be declared to Sprockets using the global comment:

// application.jass
//= global vue Vue
//= global vue-router VueRouter

import Vue from 'vue'
import Foo from 'custom-dependency'