g-resource
Version:
Generate resource scaffolding.
48 lines (35 loc) • 1.03 kB
Markdown
g-resource
Generate resource scaffolding.
# Getting started
Add the following to your `package.json` file to download the binary and
setup an npm script to run the task.
```json
./package.json
"scripts": {
"g:resource": "./node_modules/.bin/g_resource",
},
```
Now run the commands:
```bash
npm install g-resource --save-dev
mkdir -p ./app/controllers
mkdir -p ./app/models
mkdir -p ./config/routes
mkdir -p ./test/features
mkdir -p ./test/models
npm run g:resource
//=> prompt: What is the singular resource name? (i.e. Post): Comment
//=>
//=> Creating resource files:
//=> ./config/routes/comments_router.js
//=> ./app/controllers/comments_controller.js
//=> ./app/models/comment.js
//=> ./test/features/comments_router_test.js
//=> ./test/models/comment_test.js
```
# Changelog
Get the project's history in [CHANGELOG.md](CHANGELOG.md).
# Maintainer
Andy Bettisworth <andy@accreu.com> https://andybettisworth.com
# License
This project is released under the [MIT License](LICENSE.txt).