@mccarthyfinch/author-ui-components v0.4.9
To use in your app, install via
npm i --save McCarthyFinch/Author.UIComponents#0.1.1
0.1.1 being the version you want to install
Development
Please read about the difference between peerDependencies, dependencies, and devDependencies before adding a dependency. See https://eriksamuelsson.com/difference-between-npm-dependencies/
Rule of thumb - don't put your dependency under 'dependencies' but rather 'devDependencies' and 'peerDependencies'.
Also when using peer dependencies, don't use exact versioning unless necessary.
Publishing
You can run npm run release
to release and publish your changes.
In future, we want to make publish not publish to npm and only to github, but we are having issues with buildkite ssh permissions.
Since we are keeping the dist
folder in github the client of this repo can use the built code straight from github. Because of this, we can actually create a build on a branch and use that instead of a proper version. Eg
- Be on branch
new-feature
npm run build
- Commit and push changes to the github
new-feature
branch - In the other repo run
npm i --save McCarthyFinch/Author.UIComponents#new-feature
npm link
To use this lib locally somewhere else:
- Run
npm link
in the root of this repo. - Run
npm link @mccarthyfinch/author-ui-components
in the repo that you're using author-ui-components in - Run
npm run watch
ornpm run start
in this repo to watch for changes.watch
will only do the typescript compilation when files change, butstart
will also do the storybook compilation when files change
Setup
If the other repo has not been set up to use Author.UIComponents yet you may need to do the following
- Update webpack config aliases
{
resolve: {
alias: {
'react': path.resolve(path.join(__dirname, '../node_modules/react')),
'styled-components': path.resolve(path.join(__dirname, '../node_modules/styled-components')),
}
}
}
- update tsconfig
{
"compilerOptions": {
"paths": {
"*": ["node_modules/@types/*", "*"]
}
}
}
Troubleshooting
If the repo you are using it in is trying to use TypeScript to type-check the Author.UIComponents/src folder add the following in the tsconfig.json
{
"exclude": [
"node_modules/@mccarthyfinch/author-ui-components/src/**/*"
]
}
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago