cloneman
v1.15.0
Published
Application template and lifecycle management tool
Readme
cloneman
Template manager for Node applications and libraries. 🐢
Usage for consumers
Available commands
- Create
- Update
- Verify
- Migrate
Create a new application based on a template
npx cloneman create my-new-application template-package-name
Keep in mind that template-package-name needs to be published to the npm registry.
The latest version of the template is installed by default. To install a specific version, specify it using the @version suffix:
npx cloneman create my-new-application [email protected]
You can also refer to a local template file:
npx cloneman create my-new-application ../directory/template.tgz
Update your application
Note: You can only update your application using the same template it was created with.
To the latest version:
npx cloneman update
You can also update to a specific version:
npx cloneman update 1.2.3
Local tarball
As with the create command, you can also point to a local tarball:
npx cloneman update ../directory/template.tgz
Verify
Verifies the application has been updated with the template (NPM dependency). Typically used to fail the build when an external tool such as Dependabot or Renovate is used to update the NPM dependency.
npx cloneman verify
Exits successfully if the application is up-to-date or with a non-zero status and a detailed instruction if the application needs to be updated.
It is recommended to run this from the prepare script in the applications package.json:
npm pkg set scripts.prepare="cloneman verify"
Migrate
Migrates an existing application to use a cloneman template.
npx cloneman migrate template-package-name
After migrating, run update to apply the template files:
npx cloneman update
Note: the migration won't modify any files other than package.json, which connects your application to a specific template. It is up to the update command to actually modify the repository.
Creating and managing templates
See docs/templates.md for more information.
