This file contains hidden or 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
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); | |
workbox.precaching.suppressWarnings(); | |
// the following line will be replaced by workbox-cli | |
workbox.precaching.precacheAndRoute([]); | |
// Cache unpkg (for systemjs) | |
workbox.routing.registerRoute( | |
/^https:\/\/unpkg\.com/, | |
workbox.strategies.cacheFirst({ |
This file contains hidden or 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
{ | |
"scripts": { | |
"build": "rollup -c --prod --mini", | |
"watch": "rollup -c -w", | |
"serve": "serve" | |
} | |
} |
This file contains hidden or 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
{ | |
"public": "public", | |
"rewrites": [{ "source": "/**", "destination": "/index.html" }] | |
} |
This file contains hidden or 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
[ignore] | |
.*/node_modules/.* | |
.*/public/.* | |
.*/__tests__/.* | |
.*/cypress/.* | |
[include] | |
[libs] | |
flow-typed |
This file contains hidden or 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
import babel from "rollup-plugin-babel"; | |
import commonjs from "rollup-plugin-commonjs"; | |
import nodeResolve from "rollup-plugin-node-resolve"; | |
import { terser } from "rollup-plugin-terser"; | |
import replace from "rollup-plugin-replace"; | |
import builtins from "rollup-plugin-node-builtins"; | |
import globals from "rollup-plugin-node-globals"; | |
import clear from "rollup-plugin-clear"; | |
const outputDir = "./public/js/"; |
This file contains hidden or 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
Show hidden characters
{ | |
"env": { | |
"production": { | |
"presets": [["@babel/preset-env", { | |
"targets": { | |
"browsers": [ | |
">0.25%", | |
"not op_mini all" | |
] | |
} |
This file contains hidden or 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
<!-- see it in action here : https://github.com/rollup/rollup-starter-code-splitting/blob/master/public/index.html --> | |
<!-- Browsers with dynamic import support --> | |
<script type="module"> | |
window.esDynamicImport = true; | |
// this will throw if dynamic import is not supported | |
import("/js/es/entrypoint.js").then(function(m) { | |
// do something | |
}); | |
</script> |
This file contains hidden or 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
/** | |
* Recupere les limites d'un polygone | |
* | |
* @method getPolygonBounds | |
* @param {Object} polygon un `polygon` gmap | |
* @return {Object} bounds | |
*/ | |
getPolygonBounds: function(polygon) { | |
var paths = polygon.getPaths(); | |
var bounds = new google.maps.LatLngBounds(); |
This file contains hidden or 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
#TITLE=JavaScript | |
; JavaScript syntax file written by ES-Computing, edited by https://github.com/Eartz/ based on ECMA-262 6th Edition / Draft April 3, 2015. | |
; This file is required for EditPlus to run correctly. | |
#DELIMITER=,(){}[]-+*%/="'`~!&|<>?:;. | |
#QUOTATION1=' | |
#QUOTATION2=" | |
#QUOTATION3=` | |
#LINECOMMENT=// | |
#LINECOMMENT2= |
This file contains hidden or 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
/* | |
http://www.es6fiddle.net/i8d8e1um/ | |
*/ | |
var throttle = (func,ms=50,context=window) => { | |
let to; | |
let wait=false; | |
return (...args) => { | |
let later = () => { | |
func.apply(context,args); | |
}; |