Skip to content

Commit b81dd6d

Browse files
committed
Fixed typos in README.md, removed umd bundle, npm packages versions bump
1 parent d43630a commit b81dd6d

File tree

4 files changed

+659
-1432
lines changed

4 files changed

+659
-1432
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ class ClassComponent extends Component {
8585
}
8686
}
8787

88-
const ClassCompoenntWithHOC = withMyContext(ClassComponent);
88+
const ClassComponentWithHOC = withMyContext(ClassComponent);
8989

9090
function App() {
9191
return (
9292
<MyContextProvider>
9393
<ComponentWithHook />
9494
<ComponentWithConsumer />
95-
<ClassCompoenntWithHOC />
95+
<ClassComponentWithHOC />
9696
</MyContextProvider>
9797
);
9898
}

package.json

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,43 @@
11
{
2-
"name": "create-use-context",
3-
"version": "1.0.1",
4-
"description": "A helper method which wraps original React `createContext` method and provides additional functionality like wrapping a `Context.Provider`, `useContext` helper, etc.",
5-
"repository": {
6-
"type": "git",
7-
"url": "https://github.com/todesstoss/create-use-context.git"
2+
"author": "Eugene Mickhnitskyy",
3+
"dependencies": {
4+
"react-display-name": "0.2.4"
85
},
9-
"main": "dist/cjs/index.js",
10-
"module": "dist/esm/index.js",
11-
"browser": "dist/umd/index.js",
12-
"scripts": {
13-
"build": "rollup -c",
14-
"dev": "rollup -c -w",
15-
"test": "echo \"Error: no test specified\" && exit 1"
6+
"description": "A helper method which wraps original React `createContext` method and provides additional functionality like wrapping a `Context.Provider`, `useContext` helper, etc.",
7+
"devDependencies": {
8+
"@babel/core": "7.7.4",
9+
"@babel/preset-env": "7.7.4",
10+
"@babel/preset-react": "7.7.4",
11+
"prettier": "1.19.1",
12+
"rollup": "1.27.5",
13+
"rollup-plugin-babel": "4.3.3"
1614
},
15+
"files": [
16+
"dist/cjs/*",
17+
"dist/esm/*"
18+
],
1719
"keywords": [
1820
"React",
1921
"Context",
2022
"Hooks",
2123
"createContext"
2224
],
23-
"files": [
24-
"dist/cjs/*",
25-
"dist/esm/*",
26-
"dist/umd/*"
27-
],
28-
"author": "Eugene Mickhnitskyy",
2925
"license": "MIT",
30-
"devDependencies": {
31-
"@babel/core": "^7.4.5",
32-
"@babel/preset-env": "^7.4.5",
33-
"@babel/preset-react": "^7.0.0",
34-
"prettier": "^1.17.1",
35-
"rollup": "^1.12.3",
36-
"rollup-plugin-babel": "^4.3.2",
37-
"rollup-plugin-commonjs": "^10.0.0",
38-
"rollup-plugin-node-resolve": "^5.0.0",
39-
"rollup-plugin-terser": "^5.0.0"
40-
},
26+
"main": "dist/cjs/index.js",
27+
"module": "dist/esm/index.js",
28+
"name": "create-use-context",
4129
"peerDependencies": {
4230
"hoist-non-react-statics": "^3.3.0",
4331
"react": "^16.8.0"
4432
},
45-
"dependencies": {
46-
"react-display-name": "^0.2.4"
47-
}
33+
"repository": {
34+
"type": "git",
35+
"url": "https://github.com/todesstoss/create-use-context.git"
36+
},
37+
"scripts": {
38+
"build": "rollup -c",
39+
"dev": "rollup -c -w",
40+
"test": "echo \"Error: no test specified\" && exit 1"
41+
},
42+
"version": "1.0.2"
4843
}

rollup.config.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,6 @@
11
import babel from 'rollup-plugin-babel';
2-
import resolve from 'rollup-plugin-node-resolve';
3-
import commonjs from 'rollup-plugin-commonjs';
4-
import { terser } from 'rollup-plugin-terser';
52

63
export default [
7-
// browser-friendly UMD build
8-
{
9-
input: 'src/index.js',
10-
plugins: [
11-
resolve(),
12-
babel({
13-
exclude: 'node_modules/**',
14-
}),
15-
commonjs(),
16-
terser(),
17-
],
18-
output: {
19-
exports: 'named',
20-
name: 'createUseContext',
21-
file: 'dist/umd/index.js',
22-
format: 'umd',
23-
esModule: false,
24-
globals: {
25-
react: 'React',
26-
'hoist-non-react-statics': 'HoistNonReactStatics',
27-
},
28-
},
29-
external: ['react', 'hoist-non-react-statics'],
30-
},
31-
// CommonJS (for Node) and ES module (for bundlers) build.
324
{
335
input: {
346
index: 'src/index.js',

0 commit comments

Comments
 (0)