lineman-rails
Configures Lineman to deploy assets elegantly with Ruby on Rails
Last updated 6 years ago by searls .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lineman-rails 
SYNC missed versions from official npm registry.

lineman-rails

Install this module if you plan on using rails-lineman to deploy Lineman assets inside a Rails application.

To install to your lineman app, cd into your project directory and run:

npm i --save-dev lineman-rails

No further configuration is required.

What does this module do?

The rails-lineman gem deals with the production asset deployment such that running rake assets:precompile will do a clean lineman build of your lineman app, and then put them on an asset path so your assets get precompiled/fingerprinted by the asset pipeline.

What this lineman-rails npm module does is provide lineman plugin behavior to make the development story easier while working in conjunction with rails.

By default it:

  • Sets up API proxying for the server to localhost:3000 for development
  • Mounts static routes so that Rails asset_path helpers in development can be provided the same string in both dev & prod while you just happily hack away inside app/js and app/css without worrying about it.
  • disables the pages task entirely since you'll probably want to use a Rails view, even in development

If you want to add additional staticRoutes (say, for fonts or images), you can do that by adding properties to the server.staticRoutes config object.

Configuration

Configuration options exposed by this plugin must be overridden in your config/application file, like so:

  plugins:
    rails:
      namespace: "my-app"

The "namespace" property enables support for rails-lineman's multi-project option, so your ERB can start looking for your app assets in <%= javascript_include_tag "lineman/my-app/app" %>

Current Tags

  • 0.1.0                                ...           latest (6 years ago)

3 Versions

  • 0.1.0                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |