More prod

This commit is contained in:
Jori Lallo
2016-05-23 22:20:16 -07:00
parent 9c3d30e87e
commit fce55bb01b
12 changed files with 69 additions and 73 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":3,"file":"bundle.652211b0ea5e60dd6e46.js","sources":["webpack:///bundle.652211b0ea5e60dd6e46.js","webpack:///"],"mappings":"AAAA;ACwwHA;AAy/EA;AAyiFA;AA28FA;AAr1IA;AA45IA;;;;;AAo9GA;;;;;AAglFA;AAg7GA;;;;;;;;;;;;;;AAgxCA;AA0rHA;AA8pEA;AAklEA;AAmqEA;AA0gEA;AAowFA;AAunIA;AA2sEA;AAwiEA;AAygDA;AAujJA;AA25EA;AA22HA;AAihIA;AAg5EA;AAq1EA","sourceRoot":""}

49
dist/bundle.73791e362439b3ca0dc5.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"version":3,"file":"bundle.73791e362439b3ca0dc5.js","sources":["webpack:///bundle.73791e362439b3ca0dc5.js","webpack:///"],"mappings":"AAAA;ACwwHA;AAy/EA;AAyiFA;AA28FA;AAr1IA;AA45IA;;;;;AAo9GA;;;;;AA2hFA;AAm7GA;;;;;;;;;;;;;;AAk0CA;AAkrHA;AAgqEA;AAilEA;AA0qEA;AAogEA;AA8wFA;AAonIA;AAyuEA;AAkgEA;AA4gDA;AAmjJA;AAg6EA;AAw2HA;AAkhIA;AAg6EA;AA8zEA","sourceRoot":""}

4
dist/index.html vendored
View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<title>Beautiful Atlas</title> <title>Beautiful Atlas</title>
<link href="/static/styles.css" rel="stylesheet"></head> <link href="/static/styles.73791e362439b3ca0dc5.css" rel="stylesheet"></head>
<body style='display: flex; width: 100%'> <body style='display: flex; width: 100%'>
<div id="root" style='display: flex; width: 100%'></div> <div id="root" style='display: flex; width: 100%'></div>
<script type="text/javascript"> <script type="text/javascript">
@ -15,5 +15,5 @@
// }); // });
// }; // };
</script> </script>
<script type="text/javascript" src="/static/bundle.652211b0ea5e60dd6e46.js"></script></body> <script type="text/javascript" src="/static/bundle.73791e362439b3ca0dc5.js"></script></body>
</html> </html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"version":3,"file":"styles.73791e362439b3ca0dc5.css","sources":[],"mappings":"","sourceRoot":""}

1
dist/styles.css.map vendored
View File

@ -1 +0,0 @@
{"version":3,"file":"styles.css","sources":[],"mappings":"","sourceRoot":""}

View File

@ -2,6 +2,8 @@ require('./init');
var app = require('./server').default; var app = require('./server').default;
var http = require('http'); var http = require('http');
console.log(process.env);
var server = http.createServer(app.callback()); var server = http.createServer(app.callback());
server.listen(process.env.PORT || '3000'); server.listen(process.env.PORT || '3000');
server.on('error', (err) => { server.on('error', (err) => {

View File

@ -9,7 +9,8 @@
"build:analyze": "cross-env NODE_ENV=production webpack --config webpack.config.prod.js --json | webpack-bundle-size-analyzer", "build:analyze": "cross-env NODE_ENV=production webpack --config webpack.config.prod.js --json | webpack-bundle-size-analyzer",
"build": "npm run clean && npm run build:webpack", "build": "npm run clean && npm run build:webpack",
"start": "cross-env NODE_ENV=development DEBUG=1 ./node_modules/.bin/nodemon --watch server index.js", "start": "cross-env NODE_ENV=development DEBUG=1 ./node_modules/.bin/nodemon --watch server index.js",
"lint": "eslint src" "lint": "eslint src",
"heroku-postbuild": "npm run build"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -64,9 +65,7 @@
"sequelize-encrypted": "^0.1.0", "sequelize-encrypted": "^0.1.0",
"truncate-html": "0.0.6", "truncate-html": "0.0.6",
"uuid": "^2.0.2", "uuid": "^2.0.2",
"validator": "^5.2.0" "validator": "^5.2.0",
},
"devDependencies": {
"classnames": "^2.2.3", "classnames": "^2.2.3",
"codemirror": "^5.11.0", "codemirror": "^5.11.0",
"cross-env": "^1.0.7", "cross-env": "^1.0.7",
@ -103,9 +102,14 @@
"redux-thunk": "^2.0.1", "redux-thunk": "^2.0.1",
"sass-loader": "^3.2.0", "sass-loader": "^3.2.0",
"style-loader": "^0.13.0", "style-loader": "^0.13.0",
"sw-toolbox": "^3.1.1",
"to-markdown": "^2.0.1", "to-markdown": "^2.0.1",
"url-loader": "^0.5.7", "url-loader": "^0.5.7",
"webpack": "^1.12.12" "webpack": "^1.12.12"
},
"devDependencies": {
"koa-webpack-dev-middleware": "^1.2.0",
"koa-webpack-hot-middleware": "^1.0.3",
"node-dev": "^3.1.0",
"nodemon": "^1.9.1"
} }
} }

View File

@ -1,10 +1,3 @@
import keyMirror from 'fbjs/lib/keyMirror';
// Constant KEYS 🔑
const keys = keyMirror({
JWT_STORE_KEY: null, // localStorage key for JWT
});
// Constant values // Constant values
const constants = { const constants = {
API_USER_AGENT: `Atlas`, API_USER_AGENT: `Atlas`,

View File

@ -7,8 +7,9 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
require('dotenv').config(); require('dotenv').config();
var definePlugin = new webpack.DefinePlugin({ var definePlugin = new webpack.DefinePlugin({
__DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')), __DEV__: JSON.stringify(JSON.parse(process.env.NODE_ENV !== 'production')),
__PRERELEASE__: JSON.stringify(JSON.parse(process.env.BUILD_PRERELEASE || 'false')) __PRERELEASE__: JSON.stringify(JSON.parse(process.env.BUILD_PRERELEASE || 'false')),
SLACK_REDIRECT_URI: process.env.SLACK_REDIRECT_URI,
}); });
module.exports = { module.exports = {
@ -46,10 +47,6 @@ module.exports = {
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
'fetch': 'imports?this=>global!exports?global.fetch!isomorphic-fetch' 'fetch': 'imports?this=>global!exports?global.fetch!isomorphic-fetch'
}), }),
new ExtractTextPlugin("styles.css"), new ExtractTextPlugin('styles.[hash].css'),
new HtmlWebpackPlugin({
title: 'Atlas',
template: 'server/static/index.html',
}),
] ]
}; };