This is a package manager for Cpp to give agility in development.
npm install cpp-package-manager -g
This project provide three features for manager cpp package.
cpm init
This command will generate a cpm.package.json
file with the following properties:
{
"name": "cpp-package-manager",
"description": "This is a package manager for Cpp to give agility in development.",
"version": "1.0.0"
}
After generate the file you can add packages with Git
https url, just like the example:
"dependencies": [
{
"name": "complex-number",
"url": "https://github.com/lucaslacerdacl/complex-number.git"
}
]
cpm install
This command will clone the projects and create the cpm_modules
folder with packages already built in dist folder by each package.
.
└── cpm_modules
└── complex_number
├── dist # Compiled files
└── src
cpm build
This command will generate binaries files in dist folder for all packages in cpm_modules
.
Optionally you can create a config file called cpm.build.json
just like the example:
{
"fileName": "project.exe",
"binaries": [
"dist/main.o",
"dist/calculator.o",
"cpm_modules/complex-number/dist/complex.polar.o"
]
}
cpm version
This command will print the current version installed on your device.
If any error occured a cpm.log.json
file will be created showing date and the description of the error.
*This feature is not avaliable as command.
- Node
- NPM
- Typescript
- Chalk
- Figlet
- Inquirer
- Lodash
- Minimist
- Nodegit
- Jest
You will need install Node. You will need install GNU Compiler Collection.
The project is build and release in Azure DevOps.
This project is using the pattern MAJOR.MINOR.PATCH
. You can read more in Semantic Versioning.
You can run:
npm run test
This command will run jest
with code coverage.
This project is using ts-jest
preset and run on src
folder.
"jest": {
"preset": "ts-jest",
"roots": [
"src"
]
}
.
└── src
├── assets
├── options
└── index.ts
Created in first moment to store project logo. In the future can used to hosted static files.
All commands is in options folder. Each command has his own model and test.
Get command and choose the options.
Check the proccess in Medium: Construindo um CLI com Node.js e TS.
License under MIT.