$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
<!doctype html> | |
<html> | |
<head> | |
<title>What's the fastest way to create shadow DOM</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { | |
padding: 3em; | |
font-family: "Roboto", sans-serif; |
<script src="https://unpkg.com/@webcomponents/custom-elements"></script> | |
<style> | |
body { | |
margin: 0; | |
} | |
/* Style the element from the outside */ | |
/* | |
fancy-tabs { | |
margin-bottom: 32px; |
'use strict'; | |
/* | |
* Binary search tree with in-order iteration. | |
* http://greim.github.io/gen/dist/00-intro.html | |
*/ | |
class Tree { | |
add(value) { | |
if (this.root) this.root.add(value); |
<canvas height="720" width="1280" id="canvas"></canvas> | |
<button id="snapshotBtn">snapshot</button> | |
<script> | |
var fragments = []; | |
var frames = []; | |
var ws = new WebSocket('ws://192.168.1.3:4001'); | |
var canvas = document.getElementById('canvas'); | |
var ctx = canvas.getContext('2d'); | |
var reader = new FileReader(); |
#!/bin/bash | |
#Vars | |
web_service='nginx' | |
config_path='/usr/local/letssl/' | |
le_path='/opt/letsencrypt' | |
exp_limit=20; | |
#Func | |
function check_ssl { |
const startEngine = Symbol(); | |
export default class Car { | |
engine; | |
constructor(engine) { | |
this.engine = engine; | |
} | |
start() { |
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.
In that post I talked about 3 main reasons for moving from require.js to webpack:
Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.
// directly uploads to S3 | |
// See http://philfreo.com/blog/how-to-allow-direct-file-uploads-from-javascript-to-amazon-s3-signed-by-python/ | |
// See https://github.com/elasticsales/s3upload-coffee-javascript | |
editors.Filepicker = editors.Text.extend({ | |
tagName: 'div', | |
events: { | |
'change input[type=file]': 'uploadFile', |