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
| if (typeof module !== 'undefined' && module.exports) { | |
| module.exports = library; | |
| } else { | |
| window.library = library; | |
| } |
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
| 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 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
| { | |
| "name": "name", | |
| "main": "main", | |
| "version": "1.0.0", | |
| "private": true, | |
| "dependencies": { | |
| "react": "^15.4.2", | |
| "react-dom": "^15.4.2", | |
| }, | |
| "devDependencies": { |
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
| const a = {b: 1}; | |
| a.c = 1; |
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
| var w = (function() { | |
| var a = {b: 1}; | |
| a.c = 1; | |
| return a; | |
| })(); |
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 InfiniteGrid from "./InfiniteGrid"; | |
| // export default InfiniteGrid; | |
| export {InfiniteGrid as default}; |
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
| export const isMobile = /mobi|ios|android/.test(agent); |
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
| // 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 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
| // a.js | |
| export default function a() { | |
| } | |
| // b.js | |
| import a from "./a"; | |
| function b() { | |
| a(); | |
| } |
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
| class A { | |
| static a() {} | |
| static b = 1; | |
| static c = /mobi|ios|and/g.test(agent); | |
| } | |
| // transpile | |
| var A = /*#__PURE__*/(function () { | |
| A.a = function () {}; | |
| })(); |
OlderNewer