Skip to content

Commit 2827d10

Browse files
committed
Switched up project to use CRA for development while still releasing with straight typescript compiler
1 parent 465f413 commit 2827d10

78 files changed

Lines changed: 17022 additions & 20877 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 23 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,32 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
node_modules/
42-
jspm_packages/
43-
44-
# Snowpack dependency directory (https://snowpack.dev/)
45-
web_modules/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
49-
50-
# Optional npm cache directory
51-
.npm
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
522

53-
# Optional eslint cache
54-
.eslintcache
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
557

56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
8+
# testing
9+
/coverage
6110

62-
# Optional REPL history
63-
.node_repl_history
11+
# production
12+
/build
6413

65-
# Output of 'npm pack'
66-
*.tgz
14+
# storybook build
15+
/storybook-static
6716

68-
# Yarn Integrity file
69-
.yarn-integrity
17+
# misc
18+
.DS_Store
19+
.env.local
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
7023

71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
.parcel-cache
78-
79-
# Next.js build output
80-
.next
81-
82-
# Nuxt.js build / generate output
83-
.nuxt
84-
dist
85-
86-
# Gatsby files
87-
.cache/
88-
# Comment in the public line in if your project uses Gatsby and not Next.js
89-
# https://nextjs.org/blog/next-9-1#public-directory-support
90-
# public
91-
92-
# vuepress build output
93-
.vuepress/dist
94-
95-
# Serverless directories
96-
.serverless/
97-
98-
# FuseBox cache
99-
.fusebox/
100-
101-
# DynamoDB Local files
102-
.dynamodb/
103-
104-
# TernJS port file
105-
.tern-port
106-
107-
# Stores VSCode versions used for testing VSCode extensions
108-
.vscode-test
109-
110-
# yarn v2
111-
112-
.yarn/cache
113-
.yarn/unplugged
114-
.yarn/build-state.yml
115-
.pnp.*
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
11627

11728
# storybook
29+
storybook
11830

119-
storybook
31+
# output
32+
dist

.storybook/config.js

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,9 @@
11
import { configure, addParameters, addDecorator } from "@storybook/react";
22
import { setDefaults } from "@storybook/addon-info";
3-
import { withInfo } from "@storybook/addon-info";
43
import { withKnobs } from "@storybook/addon-knobs";
4+
import { withInfo } from "@storybook/addon-info";
55
import "./storybook.css";
66

7-
// -----------------------------------------------------------------------------------------
8-
// #region Constants
9-
// -----------------------------------------------------------------------------------------
10-
11-
const req = require.context("../src", true, /\.stories\.tsx$/);
12-
13-
// #endregion Constants
14-
15-
// -----------------------------------------------------------------------------------------
16-
// #region Functions
17-
// -----------------------------------------------------------------------------------------
18-
19-
function loadStories() {
20-
req.keys().forEach(req);
21-
}
22-
23-
// #endregion Functions
24-
25-
// -----------------------------------------------------------------------------------------
26-
// #region Configuration
27-
// -----------------------------------------------------------------------------------------
28-
297
setDefaults({
308
header: true,
319
inline: true,
@@ -41,6 +19,5 @@ addParameters({
4119
addDecorator(withInfo);
4220
addDecorator(withKnobs({ escapeHTML: false }));
4321

44-
configure(loadStories, module);
45-
46-
// #endregion Configuration
22+
// automatically import all files ending in *.stories.js
23+
configure(require.context("../src", true, /\.stories\.tsx$/), module);

.storybook/webpack.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
module.exports = ({ config }) => {
1+
const path = require("path");
2+
3+
module.exports = async ({ config, mode }) => {
24
config.module.rules.push({
35
test: /\.(ts|tsx)$/,
46
use: [
57
{
68
loader: require.resolve("awesome-typescript-loader"),
7-
options: {
8-
presets: [["react-app", { flow: false, typescript: true }]],
9-
configFileName: "./.storybook/tsconfig.json",
10-
},
119
},
1210
{
1311
loader: require.resolve("react-docgen-typescript-loader"),
@@ -16,6 +14,8 @@ module.exports = ({ config }) => {
1614
},
1715
],
1816
});
17+
1918
config.resolve.extensions.push(".ts", ".tsx");
19+
2020
return config;
2121
};

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/AndcultureCode/AndcultureCode.JavaScript.React.Components.svg?branch=master)](https://travis-ci.org/AndcultureCode/AndcultureCode.JavaScript.React.Components)
44
[![codecov](https://codecov.io/gh/AndcultureCode/AndcultureCode.JavaScript.React.Components/branch/master/graph/badge.svg)](https://codecov.io/gh/AndcultureCode/AndcultureCode.JavaScript.React.Components)
5+
![Storybook](https://raw.githubusercontent.com/storybookjs/brand/master/badge/badge-storybook.svg)
56

67
Commonly used components for react applications
78

0 commit comments

Comments
 (0)