https://github.com/mtgrosser/jass
ES6 goodness for Sprockets
https://github.com/mtgrosser/jass
es6 rails-asset-pipeline sprockets
Last synced: about 1 month ago
JSON representation
ES6 goodness for Sprockets
- Host: GitHub
- URL: https://github.com/mtgrosser/jass
- Owner: mtgrosser
- License: other
- Created: 2018-03-15T19:17:57.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T14:07:16.000Z (about 5 years ago)
- Last Synced: 2025-03-18T17:36:45.116Z (2 months ago)
- Topics: es6, rails-asset-pipeline, sprockets
- Language: Ruby
- Size: 1.26 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```ruby
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:
```js
// application.jass
//= global vue Vue
//= global vue-router VueRouterimport Vue from 'vue'
import Foo from 'custom-dependency'
```