-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(heroku): deploy apps to heroku
- enable deployment of review, staging and production apps on heroku [FInishes #162304307]
- Loading branch information
1 parent
e2e34ee
commit 238801e
Showing
10 changed files
with
567 additions
and
1,158 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "valinor-ah-frontend", | ||
"scripts": { | ||
}, | ||
"env": { | ||
}, | ||
"formation": { | ||
"web": { | ||
"quantity": 1 | ||
} | ||
}, | ||
"addons": [ | ||
|
||
], | ||
"buildpacks": [ | ||
|
||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const express = require('express'); | ||
const path = require('path'); | ||
|
||
const app = express(); | ||
const PORT = process.env.PORT || 3000; | ||
|
||
app.use(express.static(path.join(__dirname, 'dist'))); | ||
|
||
app.get('*', (req, res) => { | ||
res.sendFile(path.resolve(__dirname, 'dist', 'index.html')); | ||
}); | ||
|
||
// eslint-disable-next-line no-console | ||
app.listen(PORT, () => console.log(`app listening on port ${PORT}`)); |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ const routes = [ | |
{ | ||
path: '/login', | ||
component: Login, | ||
exact: false | ||
}, | ||
exact: true | ||
} | ||
]; | ||
|
||
export default routes; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const CompressionPlugin = require('compression-webpack-plugin'); | ||
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | ||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | ||
const cssnano = require('cssnano'); | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
entry: './src/index.js', | ||
output: { | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: 'bundle.js', | ||
publicPath: '/', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|jsx)$/, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader' | ||
}, | ||
{ | ||
test: /\.png$/, | ||
loader: 'url-loader?limit=100000' | ||
}, | ||
{ | ||
test: /\.jpg$/, | ||
loader: 'file-loader' | ||
}, | ||
{ | ||
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, | ||
loader: 'file-loader' | ||
}, | ||
{ | ||
test: /\.woff2(\?\S*)?$/, | ||
loader: 'url-loader?limit=100000' | ||
}, | ||
{ | ||
test: /\.woff(\?\S*)?$/, | ||
loader: 'url-loader?limit=100000' | ||
}, | ||
{ | ||
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, | ||
loader: 'url-loader?limit=100000&mimetype=application/octet-stream' | ||
}, | ||
{ | ||
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, | ||
loader: 'url-loader?limit=10000&mimetype=image/svg+xml' | ||
}, | ||
{ | ||
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, | ||
loader: 'file-loader' | ||
}, | ||
{ | ||
test: /font-awesome\.config\.js/, | ||
use: [ | ||
{ loader: 'style-loader' }, | ||
{ loader: 'font-awesome-loader' } | ||
] | ||
}, | ||
{ | ||
test: /bootstrap\/dist\/js\/umd\//, use: 'imports-loader?jQuery=jquery' | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: './src/index.html', | ||
filename: './index.html', | ||
inject: 'body' | ||
}), | ||
new CompressionPlugin(), | ||
new OptimizeCssAssetsPlugin({ | ||
assetNameRegExp: /\.optimize\.css$/g, | ||
cssProcessor: cssnano, | ||
cssProcessorPluginOptions: { | ||
preset: ['default', { discardComments: { removeAll: true } }], | ||
}, | ||
canPrint: true | ||
}) | ||
], | ||
resolve: { | ||
extensions: ['.js', '.jsx', '.css', '.scss'] | ||
}, | ||
optimization: { | ||
minimizer: [ | ||
new UglifyJsPlugin({ | ||
sourceMap: true, | ||
exclude: /\/node_modules/ | ||
}) | ||
] | ||
} | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const precss = require('precss'); | ||
const autoprefixer = require('autoprefixer'); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
const merge = require('webpack-merge'); | ||
const common = require('./webpack.common.js'); | ||
|
||
module.exports = merge(common, { | ||
mode: 'production', | ||
module: { | ||
rules: [{ | ||
test: /\.(s*)css$/, | ||
use: [ | ||
{ | ||
loader: MiniCssExtractPlugin.loader | ||
}, | ||
{ | ||
loader: 'style-loader' | ||
}, | ||
{ | ||
loader: 'css-loader' | ||
}, | ||
{ | ||
loader: 'postcss-loader', | ||
options: { | ||
plugins() { | ||
return [ | ||
precss, | ||
autoprefixer | ||
]; | ||
} | ||
} | ||
}, | ||
{ | ||
loader: 'sass-loader' | ||
} | ||
] | ||
}] | ||
}, | ||
}); |