nanoc-opal

This provides a filter that allows Nanoc to process content via Opal.

This gem is based on nanoc's own nanoc-dart-sass.

Installation

Add nanoc-opal to the nanoc group of your Gemfile:

group :nanoc do
  gem 'nanoc-opal'
end

Usage

Call the :opal filter. For example:

require "nanoc-opal"
compile '/script.rb' do
  filter :opal

  write item.identifier.without_ext + '.js'
end

Options passed to this filter will be passed on to Opal. For example:

filter :opal, arity_check: true

See example directory for a sample how to use Nanoc with Opal and Opal-Browser.