Skip to content

Instantly share code, notes, and snippets.

@plwalters
plwalters / gist:e4639f2baffde0ac35d9
Last active August 29, 2015 14:14
aurelia/markdown-component
import {Behavior} from 'aurelia-framework';
import showdown from 'showdown';
import prism from 'prism';
//import 'prism/themes/prism-okaidia.css!';
export class MarkdownComponentAttachedBehavior {
static metadata(){
return Behavior
@plwalters
plwalters / gist:75e373f7942cdd319817
Last active August 29, 2015 14:18
using Dependency injection to inject shared state singleton module aurelia
import {Configuration} from './configuration';
import {HttpClient} from 'aurelia-http-client';
import {inject} from 'aurelia-framework';
@inject(Configuration, HttpClient)
export class DataAccessor {
constructor(config, http){
this.path = config.baseUri + 'users/pwkad';
this.http = http;
this.getUser();
import {inject} from 'aurelia-framework';
import {HttpClient} from 'aurelia-http-client';
var autobind = fnDecorator(function(target, key, descriptor){
let fn = descriptor.value;
descriptor.value = function autobound(){
return fn.bind(this,arguments);
};
return descriptor;
});
@plwalters
plwalters / gist:43dfe3f03137bd07442d
Created August 13, 2015 01:28
Metadata api.json
{
"id": 2,
"name": "\"aurelia-metadata\"",
"kind": 2,
"kindString": "Module",
"flags": {},
"children": [
{
"id": 15,
"name": "DecoratorApplicator",
@plwalters
plwalters / build.js
Last active October 1, 2015 16:48
Bundling framework files only
var gulp = require('gulp');
var runSequence = require('run-sequence');
var changed = require('gulp-changed');
var plumber = require('gulp-plumber');
var to5 = require('gulp-babel');
var sourcemaps = require('gulp-sourcemaps');
var paths = require('../paths');
var compilerOptions = require('../babel-options');
var assign = Object.assign || require('object.assign');
@plwalters
plwalters / index.html
Last active November 10, 2015 04:33
Accompanying enhance samples
<!DOCTYPE html>
<html>
<head>
<title>Aurelia</title>
<link rel="stylesheet" href="jspm_packages/npm/[email protected]/css/font-awesome.min.css">
<link rel="stylesheet" href="jspm_packages/github/twbs/[email protected]/css/bootstrap.min.css">
<link rel="stylesheet" href="styles/styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
So I talked with Luke last night for a while and I think we have some general ideas for how we can split the two repositories up and get some tasks in place. The big blocker that I can foresee is that thus far I've only been helping with some maintenance and easy tasks so I need to dive deeper in to the 'flow' of validation to make sure we maintain everything properly. I spent a few hours last night combing through the code to get a better technical understanding. I'm proposing that for the beta releases we make sure the validation library is rock-solid and that aurelia-templating-validation is priority #2. Removing the DOM manipulation that currently takes place in Validation seems like it is going to greatly simplify things and enable implementing better hooks for templating but it seems that the DOM-related stuff is all Bootstrap and I'm not certain if it adds as much value up front as having a stabilized and rock-solid API for validation. Most of the DOM manipulation should be able to be accomplished in a
@import url(http://fonts.googleapis.com/css?family=Roboto:400);
body {
background-color:#e0e0e0;
-webkit-font-smoothing: antialiased;
font: normal 14px Roboto,arial,sans-serif;
}
/*.navbar-default {background-color:#f4f4f4;margin-top:50px;border-width:0;z-index:5;}
.navbar-default .navbar-nav > .active > a,.navbar-default .navbar-nav > li:hover > a {border:0 solid #4285f4;border-bottom-width:2px;font-weight:800;background-color:transparent;}
.navbar-default .dropdown-menu {background-color:#ffffff;}
.navbar-default .dropdown-menu li > a {padding-left:30px;}
@plwalters
plwalters / app.html
Last active July 6, 2017 14:59 — forked from jdanyow/app.html
Aurelia Gist
<template>
<h1>${message}</h1>
<input ref="control" />
<button click.delegate="log()">Log</button>
</template>
@plwalters
plwalters / app.html
Last active March 25, 2016 21:49
Aurelia Gist
<template>
<h1>${message}</h1>
</template>