Skip to content

martypdx/simple-ractive-bundling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Ractive Bundling

This is a simple build script for bundling RactiveJS components using Gobble and Rollup.

It is designed for quick drop-in replacement for projects that are using traditional web <script> inclusion of global libraries and have been either putting Ractive templates inline or via Ractive.load().

Getting setup

All of the dependencies in the package.json either need to be installed via npm init if using the package.json, or just install via:

> npm install gobble-cli

And then run:

> gobble build -f dist

And gobble will prompt you to install the additional dependencies.

Settings

  • Output is controlled via 1) the folder you specify as the last parameter of the gobble command (dist in the example above), and 2) the file name is set on line 42 of the gobblefile.js.

  • It assumes a folder named components with single-file ractive components. You can change the folder name on line 25 of the gobblefile.js.

Consuming the output

Include the bundle.js after Ractive:

<script src='http://cdn.ractivejs.org/latest/ractive.min.js'></script>
<script src='dist/bundle.js'></script>

Example

See index.html for example of running included components.

About

Simple ractive bundling using gobble and rollup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published