In config/environment.js
:
// config/environment.js
'use strict';
/*
* Mostly this is the stock module config.
/* global firebase */ | |
'use strict'; | |
const chauffeurElem = document.querySelector('.chauffeur-script'); | |
function lazyLoad(url) { | |
return new Promise((resolve, reject) => { | |
const scriptElem = document.createElement('script'); | |
scriptElem.type = 'application/javascript'; | |
scriptElem.async = true; |
sudo: required | |
dist: trusty | |
language: node_js | |
osx_image: xcode8.3 | |
group: deprecated-2017Q2 | |
matrix: | |
include: | |
- os: linux | |
node_js: 6 | |
addons: |
<!DOCTYPE html> | |
<html style='height:100%;overflow:none'> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>My App</title> | |
<meta name="description" content="My App by My Company, Inc."> | |
<!-- http://www.favicon-generator.org/ generates a good starting manifest that I tweak by hand --> | |
<link rel="manifest" href="/manifest.json"> |
# Requirements | |
* Python 2.7 | |
* Google Chrome | |
* ChromeDriver - WebDriver for Chrome | |
- Download the latest chromedrive which is 2.28 from here - https://sites.google.com/a/chromium.org/chromedriver/downloads | |
- Extract and move `chromedriver` file to `/usr/local/bin/chromedriver` | |
- git clone https://github.com/li-xinyang/OS_FrontendMaster-dl | |
- cd OS_FrontendMaster-dl |
If you're like me and wanted to serve your main app script from a CDN and still load a web worker, you may have encountered the following error:
Uncaught DOMException: Failed to construct 'Worker': Script at 'http://cdn.example.com/worker.js' cannot be accessed from origin 'http://example.com'
You can get around this fairly simply with importScripts by making the script you instantiate your worker with load the actual worker script from the CDN.
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream