0.0.9 • Published 8 years ago
react-ts-component-starter v0.0.9
React Typescript Component Starter
Starter project for creating your own React component with TypeScript. This component is just a demo of what you get when you publish it.
Edit
- Edit
src/index.tsxandsrc/style.css
Build
npm ito install all dependencies.npm run buildto build your componentnpm linkto create a symbolic link from the global folder to your component
Run Tests
npm run testto run testsnpm run test:watchto see test status while your develop
Develop
- Create a new React app using for example
create-react-app. This app will be used for testing your component. - Import your react component
npm link <your-component>to linknode_modules/<your-component>in your application to the global folder. So when importing your component it will call on the built version in the component project.npm startin your component folder. You will see that every time you change something it will automatically rebuild.- Run your application. If using
create-react-app, run it withnpm start. - Do some changes in the component and see that the application gets updated.
Publish
- Edit
package.jsonby adding the correct information likenameandauthor. - Create a NPM account
npm loginwith your account informationnpm publishto publish your component so other can enjoy its existence.
Links
Inspired by Broda Noels blog.