Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
CLI Code Orchestrator - Generate JS source code via CLI with pre-defined code templates
CLI Code Orchestrator - Generate JS source code via CLI with pre-defined code templates
CLICO is a CLI interface to provide users to generate JS code using snippets. This is useful when there is a need for eliminating boilerplate using standardized code format. The preset templates can be defined to accept variables and the consuming user is prompted to provide values for these variables, the template is then compiled and injected in a file selected by the user.
npm install -g clico
The above example demonstrates the usage with the action.jst
template file defined as:
// example/templates/action.jst
module.exports = `export const {{=clico.functionName}} = () => ({
type: '{{=clico.actionTypeName}}',
payload: {
/* Add data here */
}
});
`
After the user input below is the resulting file:
// generatedFiles/helloWorld.js
export const helloWorld = () => ({
type: 'HELLO_WORLD_SET',
payload: {
/* Add data here */
}
});
To setup CLICO for usage in your project, follow the below steps:
templates
folder by default, to define a custom template directory add config as below, in the package.json
file// package.json
"clico": {
"templateDirectory": "mycustomdirectory"
}
// example/templates/action.jst
module.exports = `export const {{=clico.functionName}} = () => ({
type: '{{=clico.actionTypeName}}',
payload: {
/* Add data here */
}
});
In the above example the variables are defined in expressions like {{=clico.myVariableName}}
. CLICO parses all the templates and prompts the user to input the values for each of these variables.
clico
in your project in the same directory as your package.json
file and follow the prompts.FAQs
CLI Code Orchestrator - Generate JS source code via CLI with pre-defined code templates
The npm package clico receives a total of 4 weekly downloads. As such, clico popularity was classified as not popular.
We found that clico demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.