1.0.0-next.0 • Published 3 years ago
@evos-tech/propak v1.0.0-next.0
propak
- A command line tool to ease development of NPM packages with client, server and shared packages.
- Objective is to bootstrap TypeScript/NodeJS based projects for:
- CommonJS (CJS) packages for NestJS
- EcmaScript Module (ESM) packages for Angular (application & library)
- Dual package format (CJS+ESM) for packages that will be used in both server side & client side
- Highly opinionated:
- Uses NPM 7 workspaces to support multi-package projects
- Predefined TypeScript, linting (ESLint), testing (Jest) configurations
- Predefined tasks to clean, build, test, lint.
- Development mode to watch for changes and recompile based on type of package
- Bump source code versions, including support for Angular projects
- Publish to NPM registry
- Current status lacks documentation so is meant for internal use only
Getting Started
Generate default packages for the project:
# --- create NPM project
mkdir my-project
cd my-project
npm init -f
# --- add propak as a dependency
npm add -D @evos-tech/propak
# --- generate default projects
propak generate
# --- install dependencies for generated projects
npm install
# --- build and start packages
propak build
propak start
# Angular app
http://localhost:4200
# NestJS app
http://localhost:3000
The steps above will:
- Generate a new project with default packages.
api
as a package that can be used by NestJS and Angularserver-lib
as a CommonJS package that can be used as a NestJS dependencyserver
as a NestJS application serverclient-lib
as an Angular libraryclient
as an Angular application
- Build and start the packages for development.
api
will watch for changes and recompile viatsc
server-lib
will watch for changes and recompile viatsc
server
will start server and watch for changes and recompile vianest start --watch
client-lib
will watch for changes and recompile viang build --watch
client
will start Angular application and watch for changes viang serve
Configuration
Describe config.ts
Publishing Packages and Managing Versions
# set version for packages to the initial prerelease version
propak version --newVersion=v1.0.0-next.0
# ...develop your app...
# ...develop your app...
# ...develop your app...
# publish packages to NPM registry
propak publishNpm
# set version for packages to the next prerelease version
propak version --newVersion=true
# repeat from ...develop your app...
Pre-requisites
- NPM 7
- PM2
1.0.0-next.5
3 years ago
1.0.0-next.6
3 years ago
1.0.0-next.4
3 years ago
1.0.0-next.3
3 years ago
1.0.0-next.2
3 years ago
1.0.0-next.1
3 years ago
1.0.0-next.0
3 years ago