-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8d19b7
commit aa4b1de
Showing
8 changed files
with
7,790 additions
and
0 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,24 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es6: true | ||
}, | ||
extends: ['plugin:react/recommended', 'airbnb'], | ||
globals: { | ||
Atomics: 'readonly', | ||
SharedArrayBuffer: 'readonly' | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true | ||
}, | ||
ecmaVersion: 2018, | ||
sourceType: 'module' | ||
}, | ||
plugins: ['react', '@typescript-eslint'], | ||
rules: { | ||
'comma-dangle': ['error', 'never'], | ||
'arrow-parens': ['error', 'as-needed'] | ||
} | ||
}; |
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,5 @@ | ||
import sum from '../src/index'; | ||
|
||
test('Testing test suite', () => { | ||
expect(sum(1, 1)).toBe(2); | ||
}); |
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,8 @@ | ||
/* eslint-disable no-unused-vars */ | ||
module.exports = api => { | ||
const isTest = api.env('test'); | ||
|
||
return { | ||
presets: ['@babel/preset-env'] | ||
}; | ||
}; |
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,49 @@ | ||
{ | ||
"name": "diecision-maker", | ||
"version": "1.0.0", | ||
"description": "Let the roll decide", | ||
"main": "index.js", | ||
"author": "Lucas deGomez <[email protected]>", | ||
"scripts": { | ||
"start": "webpack-dev-server", | ||
"build": "webpack", | ||
"test": "jest" | ||
}, | ||
"license": "MPL-2.0", | ||
"devDependencies": { | ||
"@babel/core": "^7.8.4", | ||
"@babel/preset-env": "^7.8.4", | ||
"@types/react": "^16.9.19", | ||
"@types/react-dom": "^16.9.5", | ||
"@typescript-eslint/eslint-plugin": "^2.19.2", | ||
"@typescript-eslint/parser": "^2.19.2", | ||
"babel-loader": "^8.0.6", | ||
"eslint": "^6.8.0", | ||
"eslint-config-airbnb": "^18.0.1", | ||
"eslint-plugin-import": "^2.20.1", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-react": "^7.18.3", | ||
"eslint-plugin-react-hooks": "^1.7.0", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^25.1.0", | ||
"prettier": "^1.19.1", | ||
"source-map-loader": "^0.2.4", | ||
"ts-loader": "^6.2.1", | ||
"typescript": "^3.7.5", | ||
"webpack": "^4.41.6", | ||
"webpack-cli": "^3.3.11", | ||
"webpack-dev-server": "^3.10.3" | ||
}, | ||
"dependencies": { | ||
"react": "^16.12.0", | ||
"react-dom": "^16.12.0" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": ["js", "jsx"], | ||
"moduleDirectories": ["node_modules", "shared"], | ||
"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|scss)$": "identity-obj-proxy" | ||
} | ||
} | ||
} |
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Hello world</title> | ||
</head> | ||
|
||
<body> | ||
<h1>Loading ...</h1> | ||
<script src="bundle.js"></script> | ||
</body> | ||
|
||
</html> |
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,7 @@ | ||
console.log('Hello from webpack'); | ||
|
||
function sum(a, b) { | ||
return a + b; | ||
} | ||
|
||
module.exports = sum; |
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,32 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
module.exports = { | ||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development', | ||
entry: { | ||
app: './src/index.js' | ||
}, | ||
devServer: { | ||
contentBase: './public', | ||
port: 4000, | ||
watchContentBase: true, | ||
open: true, | ||
hot: true | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: 'babel-loader' | ||
} | ||
} | ||
] | ||
}, | ||
plugins: [new webpack.HotModuleReplacementPlugin()], | ||
output: { | ||
path: path.resolve(__dirname, 'public'), | ||
filename: 'bundle.js' | ||
} | ||
}; |
Oops, something went wrong.