@smileit/react-smile v1.0.9
This project was bootstrapped with Create React App.
Available Scripts
In the project directory, you can run:
npm start
or yarn start
Runs the app in development mode. Open http://localhost:3000 to view it in the browser.
The page will automatically reload if you make changes to the code.
npm test
or yarn test
Runs the test watcher in an interactive mode. By default, runs tests related to files changed since the last commit.
npm run build
or yarn build
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed.
npm version <major | minor | patch>
Versioning of this project follows Semantic Versioning (https://semver.org/). When changes are made to this project that you want to release, you should follow these steps:
- Merge or commit changes to master
- Run
npm version
with either major, minor or patch depending on the changes made e.g.npm version patch
- npm version will bump the version in
package.json
andpackage-lock.json
and create the appropriate tag (you can check by runninggit log
) - Push the changes and the new tag:
git push && git push --tags
- For more on npm version see: https://docs.npmjs.com/cli/version
User Guide
You can find detailed instructions on using Create React App and many tips in its documentation.
Local Development
When developing a project locally that depends on this library, you can make your project point to this local library by replacing the react-smile
dependency in package.json
in your project with: "react-smile": "file:../../react-smile"
. This is assuming that your project directory is sitting in the same directory as this library.
You can set this library to compile automatically when changes are made locally by running: npm start
Use with react hooks
Because this library uses react hooks, you may run into an exception Invalid Hook Call Warning. To fix this issue you should link your npm packages in this library to use the same ones as the project you are developing currently. For example:
sudo npm link ../tu884/frontend/node_modules/react
sudo npm link ../tu884/frontend/node_modules/react-dom
sudo npm link ../tu884/frontend/node_modules/react-router-dom
sudo npm link ../tu884/frontend/node_modules/@material-ui/core
Additional troubleshooting steps:
1. Remove node_modules for both library and app
2. Run npm i
for lib
3. Run npm start
for lib
4. Once compiled, run npm i
for app
5. Link libraries in lib directory (as above)
6. Run npm start
for app
3 years ago