nodester-tools
v0.0.31
Published
Toolkit to help you with the nodester application development.
Readme
nodester tools
Toolkit to help you with the nodester application development.
Installation
Install with NPM
npm install -D nodester-toolsUsage
- Ensure your project has a file named
nodester.config.jswith the following content:
const Path = require('path');
const rootDir = process.cwd();
module.exports = {
paths: {
controllers: Path.join(rootDir, 'src/app/controllers'),
facades: Path.join(rootDir, 'src/app/facades'),
filters: Path.join(rootDir, 'src/app/filters'),
models: Path.join(rootDir, 'src/db/models'),
providers: Path.join(rootDir, 'src/app/providers'),
}
}controllers, facades, models, filters, providers are absolute paths to the corresponding directories in your project.
- Add
nodester-toolsto yournpmscripts:
{
...
"scripts": {
...
"tools:generate": "nodester-tools -g",
},
"devDependencies": {
"nodester-tools": "^0.0.3",
},
...
}- Call the neccessary generation command:
model:
Will create:
- Model (if does not exist)
- Facade (if does not exist)
- Controller (if does not exist)
npm run tools:generate model <Model Name/>filter:
When you are generating a filter, provide a Role argument
- It will ensure a proper structure of your
/filtersdirectory - For example, if a role is
admin, all the filters will be placed in/filters/<Model Name>/admin
npm run tools:generate filter <Model Name/> <Role/>provider:
npm run tools:generate provider <Provider Name/>License
Copyright
Copyright 2025-present Mark Khramko
