ls-age/devtools
A collection of devtools
Stars 2
Current release commitlint-config-v0.0.0
ls-age devtools
A collection of devtools
Packages
@ls-age/commitlint-config
Like @commitlint/config-conventional, but with a sentence-cased subject
Following commit message guidelines makes it easier to follow semantic versioning, both if you manually publish releases or use a tool like @ls-age/bump-version to automate this. The commit message contains a type, a subject and (optionally) a scope:
fix(package): This is what happened
^ subject
^ scope
^ type
- The type describes what kind of change was made. It should be one of the following:
'build'
,'ci'
,'chore'
,'docs'
,'feat'
,'fix'
,'perf'
,'refactor'
,'revert'
,'style'
,'test'
. - The scope can optionally be set to the name of the sub-package or service that is affected by this commit.
- The subject contains a human-readable description of the changes made. It should start with an uppercase letter.
rollup-plugin-unused
Rollup plugin to check for unused files
This plugin helps you to keep your repository clean: It checks for source files that are not imported during a rollup build and reports them.
@ls-age/update-section
Update a section of a file
Usage
@ls-age/update-section
provides an easy way to update files that are party generated.
Example:
<!-- README.md -->
# My monorepo
## Packages
<!-- BEGIN packages -->
<!-- END packages -->
/* scripts/update-readme.js */
const Template = require('@ls-age/update-section');
// Update the packages list
const packages = [
{ name: 'First', description: 'My first package' },
{ name: 'Second', description: 'Another package' },
];
async function updateReadme() {
// Generate a list of packages
const packageList = packages.map((p) => `- **${p.name}** - ${p.description}`).join('\n');
// ...and write it to the readme file
await Template.updateSection('./README.md', 'packages', packageList);
}
updateReadme().catch((error) => {
console.error(error);
process.exitCode = 1;
});
Running node scripts/update-readme.js
results in:
<!-- README.md -->
# My monorepo
## Packages
<!-- BEGIN packages -->
<!-- This section is generated, do not edit it! -->
- **First** - My first package
- **Second** - Another package
<!-- END packages -->