@nerdjs/nerd-core
v1.0.21
Published
This is the core library for nerdjs
Downloads
161
Keywords
Readme
Nerd-Network library starter
A Nerd-network library to handle API.
Usage
npm install
Features
- Zero-setup. After running
npm install
things 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
Importing library
You can import the generated bundle to use the whole library generated by this starter:
import myLib from 'mylib'
Additionally, you can import the transpiled modules from dist/lib
in case you have a modular library:
import something from 'mylib/dist/lib/something'
NPM scripts
npm start
: Runnpm run build
in watch modenpm run build
: Generate bundles and typings, create docsnpm run lint
: Lints codeprettier-format
: Add setting up prettier format to code
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.
Good news: the setup is here for you, you must only include the dependency name in external
property within rollup.config.js
. For example, if you want to exclude lodash
, just write there external: ['lodash']
.