This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// many based/copied from https://github.com/tycho01/typical/tree/master/src | |
// utility types: | |
type False = "0"; | |
type True = "1"; | |
type Bool = True | False; | |
type If<Cond extends Bool, Then, Else> = { 1: Then; 0: Else }[Cond]; | |
type WrapInPromiseIfTrue<T, IsAsync extends Bool> = If< | |
IsAsync, | |
Promise<T>, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-param-reassign */ | |
/* | |
You should inline the chunk that this outputs into your HTML | |
then execute window.onReady() when all chunks are loaded, e.g. | |
<script async onload="executeWhenAllChunksLoaded()" src="..."> | |
where 'executeWhenAllChunksLoaded' runs 'onReady()' once all chunks have loaded | |
You may use HtmlWebpackPlugin in combination with ScriptExtHtmlWebpackPlugin to do the inlining. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fizzers = { | |
'dummy': (n) => {throw new Error('reject first test')}, | |
'concat result': (n) => (n % 3 ? '' : 'fizz') + (n % 5 ? '' : 'buzz') || n, | |
'concat result strict': (n) => (n % 3 === 0 ? '' : 'fizz') + (n % 5 === 0 ? '' : 'buzz') || n, | |
'nested ternary': (n) => n % 3 | |
? (n % 5 ? n : "Buzz") | |
: (n % 5 ? "Fizz" : "FizzBuzz"), | |
'template string': (n) => `${n % 3 ? '' : 'fizz'}${n % 5 ? '' : 'buzz'}` || n, | |
'concat all': (n) => (n % 3 ? '' : 'fizz') + (n % 5 ? '' : 'buzz') + n, | |
'append string': (n) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./someclass"></require> | |
<!--<h1>${message}</h1>--> | |
<some-class></some-class> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<input type="date" value.bind="jakasData | zajebistyServiceZmieniajacyDate"> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
repos=( dialog pal-nodejs logging-console vscode-extension cli templating-router templating validation | |
loader-nodejs bootstrapper framework ux templating-resources binding router protractor-plugin loader-webpack | |
pal-browser templating-binding bootstrapper-webpack tools i18n bundler logging testing http-client dependency-injection | |
path app-ux-showcase fetch-client metadata polyfills registry pal-worker loader event-aggregator history history-browser | |
route-recognizer task-queue skeleton-server-render app-contacts web-components animator-velocity ui-virtualization | |
pal loader-default html-import-template-loader documentation cache benchmarks aurelia animator-css typings validatejs | |
html-template-element ) | |
cloneRepo() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as path from 'path'; | |
import 'aurelia-polyfills'; | |
import {Options, NodeJsLoader} from 'aurelia-loader-nodejs'; | |
import {PLATFORM, DOM} from 'aurelia-pal'; | |
import {globalize} from 'aurelia-pal-nodejs'; | |
import {Aurelia} from 'aurelia-framework'; | |
// ignore importing '.css' files, useful only for Webpack codebases that do stuff like require('./file.css'): | |
require.extensions['.css'] = function (m, filename) { | |
return; |