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
if (typeof module !== 'undefined' && module.exports) { | |
module.exports = library; | |
} else { | |
window.library = library; | |
} |
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
const fs = require("fs"); | |
const path = require("path"); | |
const webpack = require("webpack"); | |
const WriteFilePlugin = require("write-file-webpack-plugin"); | |
const JS_DR = path.resolve(__dirname, "examples/js"); | |
function buildEntries() { | |
return fs.readdirSync(JS_DR).reduce((entries, dir) => { |
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
{ | |
"name": "name", | |
"main": "main", | |
"version": "1.0.0", | |
"private": true, | |
"dependencies": { | |
"react": "^15.4.2", | |
"react-dom": "^15.4.2", | |
}, | |
"devDependencies": { |
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
const a = {b: 1}; | |
a.c = 1; |
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
import InfiniteGrid from "./InfiniteGrid"; | |
// export default InfiniteGrid; | |
export {InfiniteGrid as default}; |
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 w = (function() { | |
var a = {b: 1}; | |
a.c = 1; | |
return a; | |
})(); |
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
export const isMobile = /mobi|ios|android/.test(agent); |
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
// side-effect | |
var isMobile = /mobi|ios|android/.test(agent); | |
// side-effect-free | |
var isMobile = /*#__PURE__*/(function() { | |
return /mobi|ios|android/.test(agent); | |
})(); |
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
class A { | |
static a() {} | |
static b = 1; | |
static c = /mobi|ios|and/g.test(agent); | |
} | |
// transpile | |
var A = /*#__PURE__*/(function () { | |
A.a = function () {}; | |
})(); |
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 __assign = (this && this.__assign) || function () { | |
__assign = Object.assign || function(t) { | |
for (var s, i = 1, n = arguments.length; i < n; i++) { | |
s = arguments[i]; | |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | |
t[p] = s[p]; | |
} | |
return t; | |
}; | |
return __assign.apply(this, arguments); |
OlderNewer