-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from andela/fix-ch-deploy-frontend-to-Heroku-1…
…67664242 #167664242 Add heroku:build command
- Loading branch information
Showing
9 changed files
with
183 additions
and
7 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 @@ | ||
web: npm run start |
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 @@ | ||
module.exports = {}; |
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,28 @@ | ||
module.exports = { | ||
coverageDirectory: 'coverage', | ||
testPathIgnorePatterns: ['/node_modules/'], | ||
transformIgnorePatterns: ['<rootDir>/node_modules/'], | ||
moduleNameMapper: { | ||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': | ||
'<rootDir>/__mocks__/fileMock.js', | ||
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js' | ||
}, | ||
collectCoverageFrom: [ | ||
'**/*.{js,jsx}', | ||
'!**/node_modules/**', | ||
'!jest.config.js', | ||
'!**/dist/**', | ||
'!**/webpack-build-utils/**', | ||
'!README.md', | ||
'Procfile', | ||
'Postcss.config.js', | ||
'!package.json', | ||
'!package-lock.json', | ||
'!cypress.json', | ||
'!<rootDir>/server.js', | ||
'!webpack.common.js', | ||
'!webpack.config.js', | ||
'!**/coverage/**', | ||
'!**/tests/**' | ||
] | ||
}; |
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,15 @@ | ||
const express = require('express'); | ||
const path = require('path'); | ||
|
||
const port = process.env.PORT || 9000; | ||
const app = express(); | ||
|
||
app.use(express.static(`${__dirname}/dist`)); | ||
|
||
app.get('*', (req, res) => { | ||
res.sendFile(path.resolve(__dirname, './dist/index.html')); | ||
}); | ||
|
||
app.listen(process.env.PORT || 3000, () => { | ||
process.stdout.write(`Listening on port ${port}`); | ||
}); |
File renamed without changes
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,128 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Application test should work fine Home Page 1`] = ` | ||
<div | ||
className="m-20 text-center" | ||
> | ||
<h1 | ||
className="text-green-700" | ||
> | ||
Welcome to ErrorSwag, what on your mind? | ||
</h1> | ||
<img | ||
alt="errorswag logo" | ||
src={Object {}} | ||
/> | ||
<Link | ||
to="/login" | ||
> | ||
<button | ||
className="bg-green-300 text-white p-2 hover:bg-green-700 border hover:border-red-300" | ||
type="button" | ||
> | ||
Login | ||
</button> | ||
</Link> | ||
</div> | ||
`; | ||
|
||
exports[`Application test should work fine on App 1`] = ` | ||
<BrowserRouter> | ||
<Routes /> | ||
</BrowserRouter> | ||
`; | ||
|
||
exports[`Application test should work fine on Login Page 1`] = ` | ||
<Fragment> | ||
<Link | ||
to="/" | ||
> | ||
<button | ||
style={ | ||
Object { | ||
"backgroundColor": "sky-blue", | ||
"border": "none", | ||
"color": "black", | ||
"marginLeft": "80%", | ||
"padding": "7px 9px", | ||
} | ||
} | ||
type="button" | ||
> | ||
Home | ||
</button> | ||
</Link> | ||
<form> | ||
<label | ||
style={ | ||
Object { | ||
"height": "2em", | ||
"width": "50%", | ||
} | ||
} | ||
> | ||
</label> | ||
<input | ||
placeholder="example@email.com" | ||
style={ | ||
Object { | ||
"border": "1px solid #333", | ||
"height": "2em", | ||
"width": "100%", | ||
} | ||
} | ||
type="email" | ||
/> | ||
<label | ||
style={ | ||
Object { | ||
"height": "2em", | ||
"width": "50%", | ||
} | ||
} | ||
> | ||
Password | ||
</label> | ||
<input | ||
placeholder="......." | ||
style={ | ||
Object { | ||
"border": "1px solid #333", | ||
"height": "2em", | ||
"width": "100%", | ||
} | ||
} | ||
type="password" | ||
/> | ||
<input | ||
style={ | ||
Object { | ||
"backgroundColor": "sky-blue", | ||
"border": "none", | ||
"color": "black", | ||
"marginLeft": "80%", | ||
"padding": "7px 9px", | ||
} | ||
} | ||
type="submit" | ||
value="login" | ||
/> | ||
</form> | ||
</Fragment> | ||
`; | ||
|
||
exports[`Application test should work fine on Routes 1`] = ` | ||
<Switch> | ||
<Route | ||
component={[Function]} | ||
exact={true} | ||
path="/" | ||
/> | ||
<Route | ||
component={[Function]} | ||
exact={true} | ||
path="/login" | ||
/> | ||
</Switch> | ||
`; |
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