All Projects → jgraichen → sprockets-standalone

jgraichen / sprockets-standalone

Licence: MIT license
Rack task library for using Sprockets standalone.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to sprockets-standalone

sprockets-bumble d
Sprockets plugin to transpile modern javascript using Babel, useful while migrating to ES6 modules
Stars: ✭ 32 (+113.33%)
Mutual labels:  sprockets, asset-pipeline
Sprockets-PHP
Sprockets for PHP
Stars: ✭ 50 (+233.33%)
Mutual labels:  sprockets, asset-pipeline
Ramses
The Rx Asset Management System for motion picture production
Stars: ✭ 48 (+220%)
Mutual labels:  asset-pipeline
spritely
Hooks into the Sprockets asset packaging system to allow you to easily generate sprite maps
Stars: ✭ 12 (-20%)
Mutual labels:  sprockets
OpenAssetIO
An open-source interoperability standard for tools and content management systems used in media production.
Stars: ✭ 140 (+833.33%)
Mutual labels:  asset-pipeline
sinatras-skeleton
Basic Sinatra Skeleton MVC CRUD App with Sprockets, Warden, ActiveRecord and PostgresQL
Stars: ✭ 13 (-13.33%)
Mutual labels:  sprockets
jquery-tmpl-rails
jQuery Templates for the Rails asset pipeline.
Stars: ✭ 46 (+206.67%)
Mutual labels:  sprockets
socket.io-rails
Rails asset pipeline wrapper for socket.io
Stars: ✭ 57 (+280%)
Mutual labels:  asset-pipeline
phoenix assets webpack
Asset Pipeline with Webpack on Phoenix
Stars: ✭ 52 (+246.67%)
Mutual labels:  asset-pipeline
React Rails
Integrate React.js with Rails views and controllers, the asset pipeline, or webpacker.
Stars: ✭ 6,417 (+42680%)
Mutual labels:  sprockets
Assimp
The official Open-Asset-Importer-Library Repository. Loads 40+ 3D-file-formats into one unified and clean data structure.
Stars: ✭ 7,309 (+48626.67%)
Mutual labels:  asset-pipeline
Blendid
A delicious blend of gulp tasks combined into a configurable asset pipeline and static site builder
Stars: ✭ 5,026 (+33406.67%)
Mutual labels:  asset-pipeline
TACTIC-Handler
PySide based TACTIC client for maya, nuke, 3dsmax, houdini, etc
Stars: ✭ 67 (+346.67%)
Mutual labels:  asset-pipeline
pwdcalc
Take no risk and help your users to choose good passwords!
Stars: ✭ 11 (-26.67%)
Mutual labels:  asset-pipeline
webpack-asset-pipeline
🚀 A missing link for the asset pipeline alternative with Webpack.
Stars: ✭ 31 (+106.67%)
Mutual labels:  asset-pipeline
gakubuchi
📄 Static pages management with Asset Pipeline
Stars: ✭ 46 (+206.67%)
Mutual labels:  asset-pipeline
core
🔥 Antares Core Implemenation. Most important project layer, this is the heart for your app. ACL, notifiter, console, geoip, areas, utils and many more...
Stars: ✭ 24 (+60%)
Mutual labels:  asset-pipeline

Sprockets::Standalone

Rack task library for using Sprockets standalone.

Installation

Add this line to your application's Gemfile:

gem 'sprockets-standalone'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sprockets-standalone

Usage

Require sprockets-standalone in your Rakefile and define the task:

require 'sprockets/standalone'

Sprockets::Standalone::RakeTask.new(:assets) do |task, sprockets|
  task.assets   = %w(app.js app.css *.png *.svg *.woff)
  task.sources  = %w(app/assets vendor/assets)
  task.output   = File.expand_path('../assets', __FILE__)
  task.manifest_name  = 'manifest.json'

  sprockets.js_compressor  = :uglifier
  sprockets.css_compressor = :sass
end

You can give a name to the task that will be used for namespacing. The example above will generate the rake tasksassets:compile, assets:clobber and assets:clean. Default value for name is assets.

If you pass a block you can configure additional parameters:

  1. task.assets - Defines the list of assets that should be compiled for you. By default it contains application.js, application.css and *.png, *.jpg, *.gif.

  2. task.source - Defines a list of source directories. The specified paths will be added to sprockets' include path. If you want a sprockets directory structure similar to Rails you need to add all paths: task.sources = %w(app/assets/javascripts app/assets/stylesheets app/assets/images).

  3. task.output - Define output directory. Default is dist.

  4. task.manifest_name - Set the name to be used for the manifest.json

  5. task.environment - Set custom sprockets environment.

You can also customize the sprockets environment in the block to configure additional preprocessors or compressors.

Note: Sprockets-standalone will always use a manifest.json even when asset digests are turned off. The manifest.json will be used to track changes. If you manually change the generated assets that will not be override when compiling assets unless there is also a change if the matching source files.

You will need to remove generated assets (rake assets:clobber) to force regeneration of all assets.

Contributing

  1. Fork it ( http://github.com/jgraichen/sprockets-standalone/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].