Skip to content

Commit 27cef6c

Browse files
authored
catalog can be prefixed to prevent overwrites of nested providers (#4)
1 parent 2491c23 commit 27cef6c

13 files changed

Lines changed: 692 additions & 902 deletions

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"@babel/preset-react"
66
],
77
"plugins": [
8-
"transform-es2015-modules-commonjs",
8+
"@babel/plugin-transform-modules-commonjs",
99
"@babel/plugin-proposal-class-properties",
1010
"@babel/plugin-proposal-object-rest-spread"
1111
]

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ coverage
88

99
# Development
1010
node_modules
11-
dist
1211
tmp
1312

13+
# build
14+
dist
15+
lib

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: node_js
22

33
node_js:
4-
- '8'
5-
- '10'
4+
- "8"
5+
- "10"
66

77
script:
88
- npm run test
@@ -13,10 +13,10 @@ notifications:
1313
email:
1414
on_failure: change
1515

16-
after_success: 'npm run coveralls'
16+
after_success: "npm run coveralls"
1717

1818
cache:
1919
directories:
2020
- ~/.npm # cache npm's cache
2121
- ~/npm # cache latest npm
22-
- node_modules # npm install, unlike npm ci, doesn't wipe node_modules
22+
- node_modules # npm install, unlike npm ci, doesn't wipe node_modules

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented here. The format is based
44
on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project
55
adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## Unreleased
8+
9+
### Added
10+
11+
- `catalog` can be prefixed to prevent overwriting during nesting providers
12+
- added `"sideEffects": false` to package.json
13+
- added `"module": "lib/index.js"` to package.json (including `lib` output)
14+
715
## 2019/03/13 0.5.0
816

917
### Added

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,20 @@ export default App
136136

137137
## How to build and test this package
138138

139-
```bash
139+
```sh
140140
# build the package
141141
npm i
142142
npm build
143143

144-
# run the example
144+
# run the example in watch-mode
145+
cd example
146+
npm run watch-client
147+
npm run watch-server
148+
149+
# or run the example in production mode
145150
cd example
146151
npm run build
147-
npm start
152+
npm run start
148153
```
149154

150155
Then open the [example](./example) folder and follow the setup instructions.

example/client/client1/catalog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Catalog } from 'react-component-catalog'
55
import App from './components/app'
66

77
// base components (or from other clients if you like)
8-
import Button from 'Base/components/button'
8+
import Button from '../base/components/button'
99
/**
1010
* client specific components
1111
*

0 commit comments

Comments
 (0)