Project

nanoc-opal

0.0
The project is in a healthy, maintained state
Provides an :opal filter for Nanoc
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 4.12
~> 1.8
 Project Readme

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.