Skip to content

Commit

Permalink
Init project boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Pickel committed Aug 18, 2018
1 parent 05282ed commit 0d0237b
Show file tree
Hide file tree
Showing 22 changed files with 11,390 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
2 changes: 2 additions & 0 deletions .storybook/addons.js
@@ -0,0 +1,2 @@
import '@storybook/addon-knobs/register';
import 'storybook-addon-jsx/register';
15 changes: 15 additions & 0 deletions .storybook/config.js
@@ -0,0 +1,15 @@
import { configure } from '@storybook/react';
import { setAddon, addDecorator } from '@storybook/react';
import JSXAddon from 'storybook-addon-jsx';
import { withKnobs, select } from '@storybook/addon-knobs/react';
addDecorator(withKnobs);
setAddon(JSXAddon);

// automatically import all files ending in *.stories.js
const req = require.context('../src', true, /.stories.tsx$/);
function loadStories() {
require('./welcomeStory');
req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
11 changes: 11 additions & 0 deletions .storybook/webpack.config.js
@@ -0,0 +1,11 @@
const path = require('path');
const TSDocgenPlugin = require('react-docgen-typescript-webpack-plugin');
module.exports = (baseConfig, env, defaultConfig) => {
defaultConfig.module.rules.push({
test: /\.(ts|tsx)$/,
loader: require.resolve('awesome-typescript-loader'),
});
defaultConfig.plugins.push(new TSDocgenPlugin());
defaultConfig.resolve.extensions.push('.ts', '.tsx');
return defaultConfig;
};
7 changes: 7 additions & 0 deletions .storybook/welcomeStory.js
@@ -0,0 +1,7 @@
import React from 'react';

import { storiesOf } from '@storybook/react';

storiesOf('Welcome', module).addWithJSX('to your new Storybook🎊', () => (
<div>This is an example component</div>
));
1 change: 1 addition & 0 deletions README.md
@@ -0,0 +1 @@
#Strichliste 2.0 ##React Redux Typescript
96 changes: 96 additions & 0 deletions package.json
@@ -0,0 +1,96 @@
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"emotion": "^9.2.5",
"lodash": "^4.17.10",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-emotion": "^9.2.5",
"react-intl": "^2.4.0",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-scripts-ts": "2.17.0",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0"
},
"scripts": {
"start": "react-scripts-ts start",
"storybook": "start-storybook -p 9001 -c .storybook",
"build": "react-scripts-ts build",
"test": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject"
},
"devDependencies": {
"@storybook/addon-info": "^3.4.10",
"@storybook/addon-knobs": "^3.4.10",
"@storybook/react": "^4.0.0-alpha.3",
"@types/fetch-mock": "^6.0.3",
"@types/jest": "^23.3.1",
"@types/lodash": "^4.14.116",
"@types/node": "^10.7.1",
"@types/react": "^16.4.11",
"@types/react-dom": "^16.0.7",
"@types/react-intl": "^2.3.9",
"@types/react-redux": "^6.0.6",
"@types/react-router": "^4.0.30",
"@types/react-router-dom": "^4.2.4",
"@types/redux-mock-store": "^1.0.0",
"@types/storybook__addon-info": "^3.4.1",
"@types/storybook__addon-knobs": "^3.4.1",
"@types/storybook__react": "^3.0.9",
"awesome-typescript-loader": "^5.2.0",
"babel-core": "^6.26.3",
"eslint": "^5.3.0",
"husky": "^0.14.3",
"jest": "^23.5.0",
"lint-staged": "^7.2.2",
"prettier": "^1.14.2",
"react-docgen-typescript-webpack-plugin": "^1.1.0",
"react-testing-library": "^5.0.0",
"redux-mock-store": "^1.5.3",
"storybook-addon-jsx": "^5.4.0",
"ts-config": "^20.4.0",
"ts-jest": "^23.1.3",
"ts-lint": "^4.5.1",
"typescript": "^3.0.1"
},
"prettier": {
"trailingComma": "es5",
"proseWrap": "never",
"singleQuote": true
},
"jest": {
"verbose": true,
"testURL": "http://localhost/"
},
"lint-staged": {
"linters": {
"*.js": [
"prettier --write",
"git add"
],
"*.md": [
"prettier --prose-wrap always --write",
"git add"
],
"*.{ts,tsx}": [
"prettier --write",
"git add",
"tslint --project tsconfig.json --config tslint.json"
],
"*.css": [
"prettier --write",
"git add"
]
}
},
"husky": {
"hooks": {
"pre-commit": "yarn test",
"pre-push": "yarn test"
}
}
}
Binary file added public/favicon.ico
Binary file not shown.
40 changes: 40 additions & 0 deletions public/index.html
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
15 changes: 15 additions & 0 deletions public/manifest.json
@@ -0,0 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
9 changes: 9 additions & 0 deletions src/app.test.tsx
@@ -0,0 +1,9 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
// tslint:disable-next-line:file-name-casing
import App from './app';

it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
});

0 comments on commit 0d0237b

Please sign in to comment.