Skip to content

mtgrosser/jass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jass

Roll ES6 with the Rails asset pipeline - no Webpack required!

Jass integrates Rollup.js, Bublé and Nodent with the Rails asset pipeline.

Installation

Add this line to your application's Gemfile:

gem 'jass'

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 Rollup using the global comment:

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

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

Releases

No releases published

Packages

No packages published