The initial source comes from sdcuike/issueBlog#4
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
https://github.com/PacktPublishing free to download books code by Packet
https://github.com/EbookFoundation/free-programming-books Very immense
| // 1 April 2020 | |
| // variant on jsx in vanilla.js | |
| // see https://gist.github.com/dfkaye/f3229e5ace79b6873022987f160c7b61 | |
| // takes a template string and mimeType | |
| // returns dom element from the template string | |
| // TODO (maybe) - add UI map capability - i.e. UI = { name: <node with var=name> } | |
| function element(template, mimeType) { | |
| return (new DOMParser) |
// @ts-nocheck //TODO: enable remove once there are typings in place
// TODO: uncomment all three eslint() occurrences once eslint warnings and errors are fixed
// for info on emitCSS etc. https://github.com/rollup/rollup-plugin-svelte#extracting-css and https://svelte.dev/docs#svelte_preprocess
// import { eslint } from 'rollup-plugin-eslint'
import { terser } from 'rollup-plugin-terser'
import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import config from 'sapper/config/rollup.js'| var saveJson = function(obj) { | |
| var str = JSON.stringify(obj); | |
| var data = encode( str ); | |
| var blob = new Blob( [ data ], { | |
| type: 'application/octet-stream' | |
| }); | |
| var url = URL.createObjectURL( blob ); | |
| var link = document.createElement( 'a' ); |
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
| /** | |
| * express static server for react build/dist test! | |
| */ | |
| // simple express server for HTML pages! | |
| // ES6 style | |
| const express = require('express'); | |
| const fs = require('fs'); | |
| const hostname = '127.0.0.1'; |