Skip to content

Commit 89d0d84

Browse files
committed
rename flow-runtime-demo to flow-runtime-docs
1 parent 1e884b1 commit 89d0d84

File tree

176 files changed

+318
-568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+318
-568
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# testing
2+
coverage
3+
4+
# misc
5+
.DS_Store
6+
.env
7+
npm-debug.log
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# testing
2+
coverage
3+
4+
# misc
5+
.DS_Store
6+
.env
7+
npm-debug.log

packages/flow-runtime-docs/.npmignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# testing
2+
coverage
3+
4+
5+
# misc
6+
.DS_Store
7+
.env
8+
npm-debug.log

packages/flow-runtime-demo/config/webpack.config.dev.js renamed to packages/flow-runtime-docs/config/webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ module.exports = {
167167
test: /\.json$/,
168168
loader: 'json'
169169
},
170-
// Process JS with Babel.
170+
// Web workers.
171171
{
172172
test: /\.worker\.(js|jsx)$/,
173173
include: paths.appSrc,

packages/flow-runtime-demo/config/webpack.config.prod.js renamed to packages/flow-runtime-docs/config/webpack.config.prod.js

+52-16
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
77
var url = require('url');
88
var paths = require('./paths');
99
var getClientEnvironment = require('./env');
10-
10+
var BabiliPlugin = require("babili-webpack-plugin");
1111

1212

1313
function ensureSlash(path, needsSlash) {
@@ -87,7 +87,7 @@ module.exports = {
8787
'react-native': 'react-native-web'
8888
}
8989
},
90-
90+
9191
module: {
9292
// First, run the linter.
9393
// It's important to do this before Babel processes the JS.
@@ -116,6 +116,7 @@ module.exports = {
116116
/\.html$/,
117117
/\.(js|jsx)$/,
118118
/\.css$/,
119+
/\.md$/,
119120
/\.json$/,
120121
/\.svg$/
121122
],
@@ -125,12 +126,17 @@ module.exports = {
125126
name: 'static/media/[name].[hash:8].[ext]'
126127
}
127128
},
129+
// markdown loader
130+
{
131+
test: /\.md$/,
132+
loader: "html-loader!markdown-loader"
133+
},
128134
// Process JS with Babel.
129135
{
130136
test: /\.(js|jsx)$/,
131137
include: paths.appSrc,
132138
loader: 'babel',
133-
139+
134140
},
135141
// The notation here is somewhat confusing.
136142
// "postcss" loader applies autoprefixer to our CSS.
@@ -149,12 +155,31 @@ module.exports = {
149155
loader: ExtractTextPlugin.extract('style', 'css?importLoaders=1!postcss')
150156
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
151157
},
158+
// Common / global SASS
159+
{
160+
test: /\/assets\/(.+)\.scss$/,
161+
exclude: /node_modules/,
162+
loader: ExtractTextPlugin.extract('style-loader', 'css!sass?sourceMap=true')
163+
},
164+
// Client and Admin SASS
165+
{
166+
test: /\/src\/(.+)\.scss$/,
167+
exclude: /node_modules/,
168+
loader: ExtractTextPlugin.extract('style-loader', 'css?modules!sass?sourceMap=true')
169+
},
152170
// JSON is not enabled by default in Webpack but both Node and Browserify
153171
// allow it implicitly so we also enable it.
154172
{
155173
test: /\.json$/,
156174
loader: 'json'
157175
},
176+
// Web workers.
177+
{
178+
test: /\.worker\.(js|jsx)$/,
179+
include: paths.appSrc,
180+
exclude: /node_modules/,
181+
loader: 'worker!babel'
182+
},
158183
// "file" loader for svg
159184
{
160185
test: /\.svg$/,
@@ -165,7 +190,7 @@ module.exports = {
165190
}
166191
]
167192
},
168-
193+
169194
// We use PostCSS for autoprefixing only.
170195
postcss: function() {
171196
return [
@@ -179,6 +204,12 @@ module.exports = {
179204
}),
180205
];
181206
},
207+
worker: {
208+
output: {
209+
filename: "compiler.worker.js",
210+
chunkFilename: "[id].compiler.worker.js"
211+
}
212+
},
182213
plugins: [
183214
// Makes the public URL available as %PUBLIC_URL% in index.html, e.g.:
184215
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
@@ -214,19 +245,24 @@ module.exports = {
214245
// Try to dedupe duplicated modules, if any:
215246
new webpack.optimize.DedupePlugin(),
216247
// Minify the code.
217-
new webpack.optimize.UglifyJsPlugin({
218-
compress: {
219-
screw_ie8: true, // React doesn't support IE8
220-
warnings: false
221-
},
222-
mangle: {
223-
screw_ie8: true
224-
},
225-
output: {
226-
comments: false,
227-
screw_ie8: true
228-
}
248+
// This takes way too long tbh.
249+
new BabiliPlugin({
250+
comments: false
229251
}),
252+
// Disabled for now because uglify does not support generators.
253+
// new webpack.optimize.UglifyJsPlugin({
254+
// compress: {
255+
// screw_ie8: true, // React doesn't support IE8
256+
// warnings: false
257+
// },
258+
// mangle: {
259+
// screw_ie8: true
260+
// },
261+
// output: {
262+
// comments: false,
263+
// screw_ie8: true
264+
// }
265+
// }),
230266
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
231267
new ExtractTextPlugin('static/css/[name].[contenthash:8].css'),
232268
// Generate a manifest file which contains a mapping of all asset filenames

packages/flow-runtime-demo/package.json renamed to packages/flow-runtime-docs/package.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"name": "flow-runtime-demo",
2+
"name": "flow-runtime-docs",
3+
"homepage": "https://codemix.github.io/flow-runtime",
34
"description": "A demo app for flow-runtime.",
45
"version": "0.0.0",
56
"devDependencies": {
@@ -12,6 +13,7 @@
1213
"babel-preset-es2015": "^6.18.0",
1314
"babel-preset-react": "^6.16.0",
1415
"babel-preset-stage-0": "^6.16.0",
16+
"babili-webpack-plugin": "^0.0.7",
1517
"case-sensitive-paths-webpack-plugin": "1.1.4",
1618
"chalk": "1.1.3",
1719
"connect-history-api-fallback": "1.3.0",
@@ -31,6 +33,7 @@
3133
"file-loader": "^0.9.0",
3234
"filesize": "3.3.0",
3335
"fs-extra": "0.30.0",
36+
"gh-pages": "^0.12.0",
3437
"gzip-size": "3.0.0",
3538
"html-loader": "^0.4.4",
3639
"html-webpack-plugin": "2.24.0",
@@ -75,7 +78,10 @@
7578
"scripts": {
7679
"start": "node scripts/start.js",
7780
"build": "node scripts/build.js",
78-
"test": "node scripts/test.js --env=jsdom"
81+
"test": "echo \"no tests for flow-runtime-docs yet!\"",
82+
"test-jsdom": "node scripts/test.js --env=jsdom",
83+
"predeploy": "npm run build",
84+
"deploy": "gh-pages -d build"
7985
},
8086
"jest": {
8187
"collectCoverageFrom": [

packages/flow-runtime-demo/public/index.html renamed to packages/flow-runtime-docs/public/index.html

+10
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,15 @@
2828
To begin the development, run `npm start`.
2929
To create a production bundle, use `npm run build`.
3030
-->
31+
<script>
32+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
33+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
34+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
35+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
36+
37+
ga('create', 'UA-51867534-2', 'auto');
38+
ga('send', 'pageview');
39+
40+
</script>
3141
</body>
3242
</html>

0 commit comments

Comments
 (0)