@nerdjs/nerd-network v3.0.5
@nerdjs/nerd-network library
A Nerd-network library to handle API calls. This library is bootstrapping with TSDX.
Features
- Zero-setup. After running
npm installthings will setup for you - RollupJS for multiple optimized bundles following the standard convention and Tree-shaking
- Prettier and TSLint for code formatting and consistency
- Automatic types
(*.d.ts)file generation
Commands
TSDX scaffolds the new library inside /src.
To run the library, use:
npm start # or yarn startThis builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.
To do a one-off build, use npm run build or yarn build.
To run tests, use npm test or yarn test.
Importing library
You can import the generated bundle to use the whole library generated by this starter:
import <feature> from '@nerdjs/nerd-network'NPM scripts
npm start: Runnpm run buildin watch modenpm run build: Generate bundles and typings, create docsnpm run lint: Lints codeprettier-format: Add setting up prettier format to code
Work locally
In order to use this library locally and make any change, inside /src use:
yarn linkThis will create a symlink that can be use in the main project as:
yarn link "@nerdjs/nerd-network"Bundle Analysis
size-limit is set up to calculate the real cost of your library with npm run size and visualize the bundle with npm run analyze.
Excluding peerDependencies
On library development, one might want to set some peer dependencies, and thus remove those from the final bundle. You can see in Rollup docs how to do that.
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.
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago