Loops, if-statements, async/await... everything you're used to is available to you.
const paths = await $.glob('src/**/*.tsx')
for (const path of paths) {
const text = await $.readFile(path);
if(...) // Do my thing
}
/**
* @alias g component
*
* @description
* Create files for a new UI component
*
* @argv name, string, required
*
* @option module, string
* :choice cms
* :choice dashboard
*
* Module where component will be placed
*/
export const generate: ...
Easy to use for everyone on your team, specially the newcomers
Commands are discoverable and interactive out of the box, so there's no need to know everything beforehand.
You can even create tutorials to help people with onboarding.
npx bcx list
Bluecodex offers, out of the box, a command to generate types for your scripts. This will help you both with type-safety and intellisense for consuming inputs and intellisense.
npx bcx gen types
Bluecodex comes with several embedded commands to give you a head start.
Common tasks such as reading and saving files, consuming templates, downloading and uploading files are a breeze.
npx bcx kit
Whether you're starting a new project, or have a large codebase on your hands, we got you covered.
To get started, you can create commands to define inputs and documentation, then call your existing scripts.
npx bcx new cmd --shell
/**
* @description
* Add a description so your teammates
* know what's up.
*
* @argv action, string
*
* @option color, string
*
* @return string
*/
export const myScript = ({ bcxArgv }) =>
$.shell(`path/to/_my-script_ ${bcxArgv}`)
Bluecodex is in active development and I would love to hear from you.
npm install --save-dev bluecodex