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

@ords/react-tcli

v2.0.0

Published

Typescript rewire of react-scripts where you can extend the webpack config. This is not a fork of react-script but it builds on top of any published react-scripts libary.

Downloads

314

Readme

react-tcli

Typescript rewire of react-scripts where you can extend the webpack config. This is not a fork of react-script but it builds on top of any published react-scripts libary.

common issues

Python with sass for windows: npm config set python "path/to/python"

Features

  • CSS modules and "normal" css
  • Jest, Enzyme and React with react-scripts and ts-jest
  • Typescript
  • Synthetic default import
  • Dynamic imports
  • Tslint
  • Path alias for typescript

Disclaimer

This is a work in progress. If you find any bug or want better documentation please let us know!

Install (getting started)

run npm install @ords/react-tcli or do a global install npm install @ords/react-tcli -g.

You can then setup a new project with: react-tcli init. This will create a new folder called sampleProject.

If you have an exisiting project then modify your package.json you can add the following scripts:

"test": "react-tcli --src customPath/To/Src --withLatestReactEnzyme",
"start": "react-tclit --src customPath/To/Src",
"build": "react-tclit --src customPath/To/Src"

Suggested tslint

Use the build in linter by adding a tslint.json file in the root of your project with the following:

{ "extends": [ "./node_modules/@ords/react-tcli/dist/defaultConfigurations/tslint.json" ] }

Suggested and tested tsconfig compiler options

We only support a target of es5. To use our tsconfig, create your own with the following content:

{ "extends": "./node_modules/@ords/react-tcli/dist/defaultConfigurations/tsconfig.json" }

CSS modules

You can use traditional css import or name your files .module.css to use css modules.

Commands

Any commands that use webpack can have the configuration extended. Configurations for all the commands are described in this section.

Command init

Creates a new project

Command test

Use Jest to run test as of react-scripts. Filenames should be [name].spec.(ts|tsx|js|jsx)

| Prop | Default | Description | |-----------------|---------|--------------------------------| | --src | src | Location of test source files | | --env | undefined | please specify jsdom to use mount in jest | | --setupTestFile | undefined | Location of jest setupTestFile | | --withLatestReactEnzyme | undefined | Using setupTestFile from this project |

Command start

Use webpack to serve and develop your react project

| Prop | Default | Description | |-----------------|---------|--------------------------------| | --src | src | Location of source files | | --public | public | Location of react public dir | | --extendWebpackFile | undefined | Location of file to extend webpack config |

Command build

Use webpack to build your react project

| Prop | Default | Description | |-----------------|---------|--------------------------------| | --src | src | Location of source files | | --public | public | Location of react public dir | | --extendWebpackFile | undefined | Location of file to extend webpack config |

More features

Are we missing anything? Should the project be even more configurable? Let us know!