All Projects → HuasoFoundries → systemjs-riot

HuasoFoundries / systemjs-riot

Licence: MIT license
jspm/systemjs plugin to load RiotJS tags and inline them in the bundle

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
Makefile
30231 projects

Projects that are alternatives of or similar to systemjs-riot

plugin-sass
SystemJS SASS loader plugin
Stars: ✭ 53 (+194.44%)
Mutual labels:  systemjs, jspm
systemjs-tools
(dev)tools for working with SystemJS
Stars: ✭ 41 (+127.78%)
Mutual labels:  systemjs, jspm
gulp-jspm-build
Gulp plugin for jspm.
Stars: ✭ 22 (+22.22%)
Mutual labels:  jspm
TypeScript-AMD-Boilerplate
A TypeScript AMD Grunt Boilerplate with RequireJS
Stars: ✭ 46 (+155.56%)
Mutual labels:  requirejs
cbuild
Use SystemJS with npm instead of jspm
Stars: ✭ 25 (+38.89%)
Mutual labels:  systemjs
jspm-mithril
Mithril.js boilerplate with hot reloading modules
Stars: ✭ 14 (-22.22%)
Mutual labels:  jspm
jspm-ember-playground
Basic Ember app which uses JSPM as a package manager
Stars: ✭ 15 (-16.67%)
Mutual labels:  jspm
Play Angular Require Seed
Seed Application for Playframework 2, RequireJS, WebJars, and AngularJS 1.x
Stars: ✭ 170 (+844.44%)
Mutual labels:  requirejs
PollMaubot
A polling plugin for Riot (using maubot)
Stars: ✭ 18 (+0%)
Mutual labels:  riot
requirex
A different kind of module loader 📦🦖
Stars: ✭ 20 (+11.11%)
Mutual labels:  systemjs
ASPNETcoreAngularJWT
Angular in ASP.NET Core with JWT solution by systemjs
Stars: ✭ 48 (+166.67%)
Mutual labels:  systemjs
babel-plugin-rewire-exports
Babel plugin for stubbing [ES6, ES2015] module exports
Stars: ✭ 62 (+244.44%)
Mutual labels:  systemjs
Kotsu
✨ Clean, opinionated foundation for new projects — to boldly go where no man has gone before
Stars: ✭ 48 (+166.67%)
Mutual labels:  jspm
angular2-esri-playground
Angular 2 & Esri 4
Stars: ✭ 30 (+66.67%)
Mutual labels:  systemjs
chrome-extension-boilerplate-riot
A boilerplate chrome extension (Single Page Application) using RIOT.js
Stars: ✭ 20 (+11.11%)
Mutual labels:  riot
Blockly Samples
Plugins, codelabs, and examples related to the Blockly library.
Stars: ✭ 222 (+1133.33%)
Mutual labels:  requirejs
aurelia-datatable
A 100% aurelia based data table component.
Stars: ✭ 32 (+77.78%)
Mutual labels:  jspm
UniquePay
微信支付、支付宝支付聚合SDK,支持内置对象调用、jsSdk 调用,支持 vuejs、script 引用
Stars: ✭ 26 (+44.44%)
Mutual labels:  requirejs
YuMusic
A Music Player Build with JavaFX WebView, iView,RequireJS
Stars: ✭ 17 (-5.56%)
Mutual labels:  requirejs
angular-gulp-starter
Simple dev/prod build for Angular (2+) using gulp, systemjs, rollup, ngc (AOT), scss, Visual Studio
Stars: ✭ 18 (+0%)
Mutual labels:  systemjs

Riot Tag Plugin for SystemJS and RequireJS

Build Status Code Climate npm

This is a loader plugin that enables to dynamically compile Riot tags from jspm/SystemJS or RequireJS and statically inline them during your build task.

Prior to version 1.2.0 the requirejs part of this loader was a separate project known as requirejs-riot, which is now deprecated in favor of this one.

Usage with JSPM/SystemJS

To use it you should install it with jspm:

jspm install tag

After that you can include Riot tags in your modules:

import riot from 'riot';
import 'app.tag!';

riot.mount('app');

You can also use it when defining AMD style modules, and combine it with the pluginFirst option of your SystemJS project to use it like:

define(['riot','tag!todo.tag'], function(riot) {
	riot.mount('todo');
    riot.route.start(true);
});

Usage with RequireJS

Install using npm like so:

npm install systemjs-riot

Add the proper config to your main requirejs.config. For example:

requirejs.config({
    paths: {
        "riot": "/node_modules/riot/riot+compiler.min",
        "tag": "../requirejs-riot",
        "tags": "./tags",
        "dist": "./dist"
    }
});

Then load your tags by prepending tag! to their path:

define(['riot','tag!timer.tag'], function(riot) {
	riot.mount('timer', {
        start: 0
    });
    riot.route.start(true);
});

Running examples

Install serve or any other basic webserver

make runexample

Then point your browser to http://localhost:3000/

Precompilation and Bundling

When you bundle or build your project, the tags will be precompiled and inlined as part of the process.

The make runexamples task does run make build, which uses both jspm and r.js to generate working bundles that you can inspect. The tasks run under the hood are:

for jspm:

jspm build 'tag!tags/todo.tag + tag!tags/timer.tag + tag!tags/app.tag - riot' example/dist/alltags.js --format umd

for the r.js optimizer

./node_modules/.bin/r.js -o example/requirejs.build.js

Tests

npm install
npm test
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].