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
//Sample.tsx | |
import * as React from 'react'; | |
export function Tiny(props: any) { | |
return ( | |
<div id="tiny" ></div> | |
); | |
} |
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
<!DOCTYPE html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="root">nothing rendered yet</div> | |
<script src='https://unpkg.com/[email protected]/umd/react.development.js'></script> | |
<script src='https://unpkg.com/[email protected]/umd/react-dom.development.js'></script> | |
<script src="https://unpkg.com/@babel/[email protected]/babel.js"></script> |
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 Vue from 'vue'; | |
Vue.config.devtools = true; | |
const componentsContext = require.context('./components', true, /\.vue$/); | |
const ComponentsById = {}; | |
const ComponentsByName = {}; | |
const ComponentsMap = {}; | |
const cMap = {}; | |
const ComponentNames = []; | |
require('./index.styl'); |
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 webpack = require('webpack'); | |
const helpers = require('./helpers'); | |
const config = require('../config'); | |
const path = require('path'); | |
const projectRoot = path.resolve(__dirname, '../'); | |
const utils = require('./utils'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const ENV = process.env.NODE_ENV || 'development'; |
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 config = require('../config'); | |
var webpack = require('webpack'); | |
var merge = require('webpack-merge'); | |
var utils = require('./utils'); | |
var path = require('path'); | |
var projectRoot = path.resolve(__dirname, '../'); | |
var baseWebpackConfig = require('./webpack.common'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const ENV = process.env.ENV = process.env.NODE_ENV = 'production'; |
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
Vue.Component({ | |
name: 'foo', | |
template: ` | |
<section v-html="markup"></section> | |
`, | |
props: [], | |
data() { | |
return { | |
markup: '' | |
}; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Array#forEach</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Untitled benchmark</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
(function() { | |
for(let i=0; i<1000 ;i++) { | |
setTimeout(function() { | |
console.log(`Hi`); | |
}, 0); | |
} | |
for(let i=0; i<1000; i++) { | |
console.log('Hello'); | |
} | |
})(); |
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
C02Q10QCG8WM:~ gpatel$ ./node_modules/.bin/babel -d ~/tmp/es5-compiled --presets es2015 ~/tmp/lib.js ~/tmp/main.js | |
/Users/gpatel/tmp/lib.js -> /Users/gpatel/tmp/es5-compiled/Users/gpatel/tmp/lib.js | |
/Users/gpatel/tmp/main.js -> /Users/gpatel/tmp/es5-compiled/Users/gpatel/tmp/main.js | |
C02Q10QCG8WM:~ gpatel$ cat ~/tmp/lib.js ~/tmp/main.js ~/tmp/es5-compiled/Users/gpatel/tmp/* | |
export const sqrt = Math.sqrt; | |
export function square(x) { | |
return x * x; | |
} | |
export function diag(x, y) { | |
return sqrt(square(x) + square(y)); |
NewerOlder