Skip to content

Commit eb892cc

Browse files
Adjustments for library exposal
1 parent 044531c commit eb892cc

19 files changed

+103
-1933
lines changed

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"root": true,
33
"ignorePatterns": [
4+
"dist/*",
5+
"node_modules/*",
46
"jest.config.js",
57
"webpack.config.js"
68
],

README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,26 @@
1-
# React Typescript Template
1+
# React Typescript Library Template
22

3-
This project contains a basic [React](https://github.com/facebook/react) application template configuration with the following extensions:
3+
This project contains a basic [React](https://github.com/facebook/react) library template configuration with the following extensions:
44
- [TypeScript](https://github.com/microsoft/TypeScript)
55
- [Webpack](https://github.com/webpack/webpack)
66
- [Babel](https://github.com/babel/babel)
77
- [ESLint](https://github.com/eslint/eslint)
88
- [Prettier](https://github.com/prettier/prettier)
99
- [Jest](https://github.com/facebook/jest)
10-
- [Styled Components](https://github.com/styled-components/styled-components)
1110

1211
## Available Scripts
1312

1413
In the project directory, you can run:
1514

16-
### `yarn start`
17-
18-
Runs the app in the development mode.\
19-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
20-
21-
The page will reload if you make edits.\
22-
You will also see any lint errors in the console.
23-
2415
### `yarn test`
2516

2617
Launches the test runner in the interactive watch mode.
2718

2819
### `yarn build`
2920

3021
Builds the app for production to the `dist` folder.\
31-
It correctly bundles React in production mode and optimizes the build for the best performance.
3222

33-
The build is minified and the filenames include the hashes.\
34-
Your app is ready to be deployed!
23+
Your library is ready to be deployed!
3524

3625
## Learn More
3726

index.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,26 @@
1-
# React Typescript Template
1+
# React Typescript Library Template
22

3-
This project contains a basic [React](https://github.com/facebook/react) application template configuration with the following extensions:
3+
This project contains a basic [React](https://github.com/facebook/react) library template configuration with the following extensions:
44
- [TypeScript](https://github.com/microsoft/TypeScript)
55
- [Webpack](https://github.com/webpack/webpack)
66
- [Babel](https://github.com/babel/babel)
77
- [ESLint](https://github.com/eslint/eslint)
88
- [Prettier](https://github.com/prettier/prettier)
99
- [Jest](https://github.com/facebook/jest)
10-
- [Styled Components](https://github.com/styled-components/styled-components)
1110

1211
## Available Scripts
1312

1413
In the project directory, you can run:
1514

16-
### `yarn start`
17-
18-
Runs the app in the development mode.\
19-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
20-
21-
The page will reload if you make edits.\
22-
You will also see any lint errors in the console.
23-
2415
### `yarn test`
2516

2617
Launches the test runner in the interactive watch mode.
2718

2819
### `yarn build`
2920

3021
Builds the app for production to the `dist` folder.\
31-
It correctly bundles React in production mode and optimizes the build for the best performance.
3222

33-
The build is minified and the filenames include the hashes.\
34-
Your app is ready to be deployed!
23+
Your library is ready to be deployed!
3524

3625
## Learn More
3726

package.json

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
{
2-
"name": "react-ts-template",
3-
"description": "React Typescript application template, with Babel, Webpack and ESLint configuration",
2+
"name": "react-ts-library",
3+
"description": "React Typescript library template, with Babel, Webpack and ESLint configuration",
44
"license": "MIT",
55
"version": "0.1.0",
66
"private": true,
77
"author": "janeksmielowski",
8-
"repository": "https://github.com/janeksmielowski/react-ts-template",
8+
"repository": "https://github.com/janeksmielowski/react-ts-library",
99
"main": "dist/index.js",
10-
"dependencies": {
10+
"peerDependencies": {
1111
"react": "17.0.1",
12-
"react-dom": "17.0.1",
13-
"styled-components": "5.2.1",
14-
"typescript": "4.1.2",
15-
"web-vitals": "1.0.1"
12+
"react-dom": "17.0.1"
1613
},
1714
"devDependencies": {
1815
"@babel/cli": "7.12.8",
@@ -29,34 +26,27 @@
2926
"@types/node": "12.0.0",
3027
"@types/react": "16.9.53",
3128
"@types/react-dom": "16.9.8",
32-
"@types/styled-components": "5.1.4",
3329
"@typescript-eslint/eslint-plugin": "4.8.2",
3430
"@typescript-eslint/parser": "4.8.2",
3531
"babel-loader": "8.2.2",
3632
"clean-webpack-plugin": "3.0.0",
37-
"copy-webpack-plugin": "6.3.2",
3833
"eslint": "7.14.0",
3934
"eslint-config-prettier": "6.15.0",
4035
"eslint-plugin-prettier": "3.1.4",
4136
"eslint-plugin-react": "7.21.5",
4237
"eslint-webpack-plugin": "2.4.0",
43-
"file-loader": "6.2.0",
44-
"html-webpack-plugin": "4.5.0",
4538
"jest": "26.6.3",
4639
"prettier": "2.2.1",
47-
"terser-webpack-plugin": "5.0.3",
4840
"ts-jest": "26.4.4",
41+
"ts-loader": "8.0.12",
42+
"typescript": "4.1.2",
4943
"webpack": "5.9.0",
50-
"webpack-cli": "4.2.0",
51-
"webpack-dev-server": "3.11.0"
44+
"webpack-cli": "4.2.0"
5245
},
5346
"scripts": {
54-
"build": "yarn test && yarn build:prod",
55-
"build:dev": "webpack --mode=development",
56-
"build:prod": "webpack --mode=production",
47+
"build": "webpack --mode=production",
5748
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
5849
"lint:fix": "yarn lint --fix",
59-
"start": "webpack serve --mode=development",
6050
"test": "jest"
6151
},
6252
"eslintConfig": {

public/assets/favicon.ico

-3.78 KB
Binary file not shown.

public/assets/logo192.png

-5.22 KB
Binary file not shown.

public/assets/logo512.png

-9.44 KB
Binary file not shown.

public/index.html

Lines changed: 0 additions & 34 deletions
This file was deleted.

public/manifest.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

public/robots.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)