Document your target environment with:
"engines": {
"npm": ">=3.3.12 <4",
"node": ">=5.5.0 <6"
},
Then install this:
"devDependencies": {
| /* by Devin Rhode (@Devinrhode2) | |
| Mustache templates are a one-time operation. | |
| I realized this doesn't have a to be, and having them auto-update is *extremely trivial* | |
| So, we have this mustache: | |
| <p>Hello, {{username}}</p> |
| import Component from 'can/component/'; | |
| export default Component.extend('CanDeferComponent', { | |
| tag: 'can-defer', | |
| viewModel: { | |
| delayMs: { | |
| type: 'number', | |
| default: 0, | |
| set: x => parseInt(x, 10) | |
| }, |
Document your target environment with:
"engines": {
"npm": ">=3.3.12 <4",
"node": ">=5.5.0 <6"
},
Then install this:
"devDependencies": {
| ///////////////////////////// | |
| // NodeJS Server | |
| ///////////////////////////// | |
| var express = require('express'); | |
| var app = express(); | |
| var http = require('http').Server(app); | |
| var io = require('socket.io')(http); | |
| var ss = require('socket.io-stream'); | |
| var path = require('path'); |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Mocha Tests", | |
| "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", | |
| "protocol": "inspector", | |
| "args": [ | |
| "-u", | |
| "tdd", | |
| "--timeout", |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="[add your binffff description]"> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| jjjj | |
| <style id="jsbin-css"> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| body.loading #splash { | |
| opacity: 1; | |
| } | |
| #splash { | |
| position: absolute; | |
| top: 0; |
| var source = `var stealTools = require("steal-tools"); | |
| stealTools.export({ | |
| steal: { | |
| config: __dirname + "/package.json!npm" | |
| }, | |
| outputs: { | |
| "+cjs": {}, | |
| "+amd": {}, | |
| "+global-js": {} |
| // set-up a connection between the client and the server | |
| var socket = io.connect(); | |
| // let's assume that the client page, once rendered, knows what room it wants to join | |
| var room = "abc123"; | |
| socket.on('connect', function() { | |
| // Connected, let's sign-up for to receive messages for this room | |
| socket.emit('room', room); | |
| }); |
| # Ask for the user password | |
| # Script only works if sudo caches the password for a few minutes | |
| sudo true | |
| # Install kernel extra's to enable docker aufs support | |
| # sudo apt-get -y install linux-image-extra-$(uname -r) | |
| # Add Docker PPA and install latest version | |
| # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
| # sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |