Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@niieani
niieani / gist:acd1ed750a55d05388434791dc3cfa60
Created November 6, 2016 15:59 — forked from mbixby/gist:3dae2026a77a9a3d3de9
Webpack Named Modules Plugin
var RequestShortener = require("webpack/lib/RequestShortener");
var _ = require("lodash");
/**
* TODO Docs
* @example new NamedModulesPlugin(/^\.\/app\/(viewmodels|records|adapters)/, /^\.\/app\/(.*)\.js$/)
*/
function NamedModulesPlugin(fileWhitelistRegex, replacementRegex) {
this.fileWhitelistRegex = fileWhitelistRegex;
this.replacementRegex = replacementRegex;
@niieani
niieani / app.html
Last active May 12, 2016 10:56 — forked from lukechilds/app.html
Aurelia Inconsistent Template Behaviour
<template>
<require from="./attaching-span"></require>
<h1>${message}</h1>
<button click.delegate="addNumber('before')">Add number before</button>
<button click.delegate="addNumber('after')">Add number after</button>
<div>
<span as-element="attaching-span" repeat.for="number of numbers">${number}</span>
</div>
</template>
@niieani
niieani / app.html
Last active September 7, 2021 13:54 — forked from jdanyow/app.html
Aurelia RequireJS Gist
<template>
<!-- Simple usage: -->
<h1>message: ${async(message).value}</h1>
<!-- With a placeholder: -->
<h1>message: ${async(message).value ? async(message).value : '...'}</h1>
</template>
@niieani
niieani / app.html
Last active January 10, 2017 15:18 — forked from jdanyow/app.html
Aurelia Gist
<template>
<require from="./test"></require>
compose: <compose view="test.html" view-model.bind="testInstance"></compose>
<hr/>
test: <test view-model.bind="testInstance"></test>
</template>