View ko.animated-css.js
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
var classesWrittenByBindingKey = '__ko__cssValue'; | |
ko.bindingHandlers.animatedCss = { | |
'update': function (element, valueAccessor) { | |
var value = ko.utils.unwrapObservable(valueAccessor()); | |
if (typeof value == "object") { | |
var currentClassList = element.className.split(/\s+/); | |
var removeClassList = []; | |
var addClassList = []; |
View index.html
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
<!DOCTYPE html> | |
<html lang="en"> | |
<body> | |
<my-element></my-element> | |
<my-element></my-element> | |
<script> | |
var MyElementProto = Object.create(HTMLElement.prototype); |
View index.html
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
<!DOCTYPE html> | |
<html lang="en"> | |
<body> | |
<template id="my-element-template"> | |
<p>My <b>custom element</b> markup!</p> | |
</template> | |
<my-element></my-element> | |
<my-element></my-element> |
View index.html
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link rel="import" href="my-element.html"> | |
</head> | |
<body> | |
<my-element></my-element> |
View Install Visual Studio Code on Linux
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
curl -L https://go.microsoft.com/fwlink/?LinkID=620884 > /tmp/vscode.zip | |
unzip -qq /tmp/vscode.zip -d /tmp | |
sudo cp -r /tmp/VSCode-linux-x64 /opt/vscode | |
sudo ln -s /opt/vscode/code /usr/local/bin/vscode | |
sudo rm -rf /tmp/VSCode-linux-x64 | |
sudo rm -f /tmp/vscode.zip | |
sudo touch /usr/share/applications/vscode.desktop | |
sudo chmod 777 /usr/share/applications/vscode.desktop | |
sudo echo -e "[Desktop Entry]\nName=VSCode\nComment=Visual Studio Code\nExec=/opt/vscode/code\nIcon=/opt/vscode/resources/app/resources/linux/code.png\nType=Application\nVersion=1.0\nTerminal=false\nCategories=Development" > /usr/share/applications/vscode.desktop | |
sudo chmod 644 /usr/share/applications/vscode.desktop |
View package.json
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
{ | |
"stuff": "...", | |
"scripts": { | |
"postinstall": "run-p install:api install:web", | |
"install:api": "cd api && npm install", | |
"install:web": "cd web && npm install", | |
"start": "run-p start:api start:web", | |
"start:api": "npm run start --prefix api", | |
"start:web": "npm run start --prefix web", |
View node.dockerfile
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
FROM node:alpine | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY server/dist /usr/src/app | |
EXPOSE 8080 | |
CMD [ "node", "server.js" ] |
View nginx.dockerfile
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
FROM nginx:alpine | |
COPY web/build /usr/share/nginx/html | |
COPY docker/nginx.node.conf /etc/nginx/conf.d/default.conf |
View nginx.node.conf
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
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} | |
location /api/ { |
View .travis.yml
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
sudo: false | |
language: node_js | |
node_js: | |
- "node" | |
cache: | |
yarn: true | |
before_install: npm install yarn -g | |
script: | |
- npm test | |
- npm run build |
OlderNewer