2.2.7 • Published 6 days ago

@nerdjs/sales-kit v2.2.7

Weekly downloads
-
License
ISC
Repository
-
Last release
6 days ago

Nerd Sales Kit User Guide

This setup is meant for developing React component libraries (not apps!) that can be published to NPM. If you’re looking to build a React-based app, you should use create-react-app, razzle, nextjs, gatsby, or react-static.

If you’re new to TypeScript and React, checkout this handy cheatsheet

Commands

The recommended workflow is to run the library in one terminal:

npm start # or yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside lib causes a rebuild to /dist.

Then run the example inside another:

cd example
npm i # or yarn to install dependencies
npm start # or yarn start

The default example imports and live reloads whatever is in /dist.

To do a one-off build, use npm run build or yarn build.

To run tests, use npm test or yarn test.

Configuration

Code quality is set up for you with prettier. Adjust the respective fields in package.json accordingly.

Bundle analysis

Calculates the real cost of your library using size-limit with npm run size and visulize it with npm run analyze.

Setup Files

This is the folder structure we set up for you:

/lib
  index.tsx       
.gitignore
package.json
README.md         # EDIT THIS
tsconfig.json

Rollup

TSDX uses Rollup as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.

TypeScript

tsconfig.json is set up to interpret dom and esnext types, as well as react for jsx. Adjust according to your needs.

Module Formats

CJS, ESModules, and UMD module formats are supported.

The appropriate paths are configured in package.json and dist/index.js accordingly. Please report if any issues are found.

Named Exports

Per Palmer Group guidelines, always use named exports. Code split inside your React app instead of your React library.

Including Styles

There are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like.

For vanilla CSS, you can include it at the root directory and add it to the files section in your package.json, so that it can be imported separately by your users and run through their bundler's loader.

Publishing to NPM

Use npm npm.

2.2.7

6 days ago

2.2.5

10 days ago

2.2.6

9 days ago

2.2.4

13 days ago

2.2.3

17 days ago

2.2.2

18 days ago

2.2.1

19 days ago

2.2.0

19 days ago

2.1.9

20 days ago

2.1.8

26 days ago

2.1.7

1 month ago

2.1.4

1 month ago

2.1.3

1 month ago

2.1.6

1 month ago

2.1.5

1 month ago

2.1.2

1 month ago

2.1.1

1 month ago

2.1.0

1 month ago

2.0.99

1 month ago

2.0.98

1 month ago

2.0.97

1 month ago

2.0.96

1 month ago

2.0.95

2 months ago

2.0.94

2 months ago

2.0.93

2 months ago

2.0.92

2 months ago

2.0.91

2 months ago

2.0.90

2 months ago

2.0.89

2 months ago

2.0.88

2 months ago

2.0.87

2 months ago

2.0.86

2 months ago

2.0.85

2 months ago

2.0.84

2 months ago

2.0.83

2 months ago

2.0.82

3 months ago

2.0.79

3 months ago

2.0.80

3 months ago

2.0.81

3 months ago

2.0.78

3 months ago

2.0.77

3 months ago

2.0.76

3 months ago

2.0.75

3 months ago

2.0.73

3 months ago

2.0.74

3 months ago

2.0.72

3 months ago

2.0.71

3 months ago

2.0.70

3 months ago

2.0.69

4 months ago

2.0.68

4 months ago

2.0.66

4 months ago

2.0.67

4 months ago

2.0.65

4 months ago

2.0.64

4 months ago

2.0.63

4 months ago

2.0.62

4 months ago

2.0.61

4 months ago

2.0.60

4 months ago

2.0.59

4 months ago

2.0.57

4 months ago

2.0.58

4 months ago

2.0.56

4 months ago

2.0.55

4 months ago

2.0.54

5 months ago

2.0.53

5 months ago

2.0.52

5 months ago

2.0.35-alpha.1

10 months ago

2.0.35-alpha.2

10 months ago

2.0.37

8 months ago

2.0.38

8 months ago

2.0.36

8 months ago

2.0.33

10 months ago

2.0.34

10 months ago

2.0.39

8 months ago

2.0.48

7 months ago

2.0.49

6 months ago

2.0.46

7 months ago

2.0.47

7 months ago

2.0.44

7 months ago

2.0.45

7 months ago

2.0.42

7 months ago

2.0.43

7 months ago

2.0.40

8 months ago

2.0.41

8 months ago

2.0.51

6 months ago

2.0.50

6 months ago

2.0.32

11 months ago

2.0.28

11 months ago

2.0.29

11 months ago

2.0.15

12 months ago

2.0.16

12 months ago

2.0.13

12 months ago

2.0.14

12 months ago

2.0.11

1 year ago

2.0.12

1 year ago

2.0.31

11 months ago

2.0.9

1 year ago

2.0.10

1 year ago

2.0.8

1 year ago

2.0.30

11 months ago

2.0.19

12 months ago

2.0.17

12 months ago

2.0.18

12 months ago

2.0.26

12 months ago

2.0.27

12 months ago

2.0.24

12 months ago

2.0.25

12 months ago

2.0.22

12 months ago

2.0.23

12 months ago

2.0.20

12 months ago

2.0.21

12 months ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago