npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dynrl/create-react-comp-scripts

v0.1.2-alpha06

Published

Custom scripts for [Create React App](https://github.com/facebook/create-react-app) for generating React component projects written in TypeScript.

Downloads

24

Readme

create-react-comp-scripts

Custom scripts for Create React App for generating React component projects written in TypeScript.

Getting Started

You must have Create React App installed globally see here for documentation.

Note: These steps will assume your new package is named my-component.

  1. create-react-app my-component --scripts-version @dynrl/create-react-comp-scripts
  2. cd my-component
  3. yarn start
  4. Launch a browser and navigate to http://localhost:9000

Available Scripts

  • yarn start - Start the Stroybook server for development
  • yarn build - Transpile to javascript in preperation for publishing
  • yarn test - Run your tests using Jest
  • yarn run format - Format your source files with Prettier
  • yarn run export - Build a standalone Storybook for hosting a demo

Developing

Development is handled through Storybook which allows you to write stories which showcase your component for various use-cases. See here for more information abour writing stories.

To launch the Storybook server simply run yarn start then open a browser and navigate to http://localhost:9000. The Storybook server has hot-reloading enabled so changing your component or story can be done while the server is running and the changes will be reflected in the browser.

Stories should be written in TypesScript and the file should end in .story.tsx and be placed in the src directory. It is recommended you place them next to your component with the same name as the component (ex. /src/hello/Hello.tsx has the story /src/hello/Hello.story.tsx).

Testing

Testing is performed using Jest and Enzyme. Tests should be written in TypeScript and the file should end in .test.ts(x) or .spec.ts(x). Like stories, it is recommended to place the tests next to your component using the same name.

To test simply run yarn test

Building

Your TypeScript code will be transpiled to JavaScript (for distribution through npm) using Rollup. This must be done before publishing.

To build simply run yarn build

Formatting

TODO

Export Demo

TODO