generator-django-js-module
v0.4.0
Published
Django JS AMD module with tests
Downloads
4
Readme
generator-django-js-module
Install
npm i -g generator-django-js-module
Usage
Run in Django project root
yo django-js-module
In first time it creates .yo-rc.json
and fills default settings
Add .yo-rc.json
to your .gitignore
Next runs generator ask you only Django app name
, Module name
and Description
. And you can run generator from any Django project folders.
Example
yo django-js-module
? Django project name: mysite
? Author name: Vladimir Rodkin
? Author email: [email protected]
? Django app name: auth
? Module name: auth-dialog
? Description:
create mysite/apps/auth/static/auth/test/auth-dialog-test.html
create mysite/apps/auth/static/auth/test/auth-dialog-test.js
create mysite/apps/auth/static/auth/js/modules/auth-dialog.js
tree
.
└── mysite
└── apps
└── auth
└── static
└── auth
├── js
│ └── modules
│ └── auth-dialog.js
└── test
├── auth-dialog-test.html
└── auth-dialog-test.js
Example
yo django-js-module
? Django app name:
? Module name: dialog
? Description:
create mysite/static/test/dialog-test.html
create mysite/static/test/dialog-test.js
create mysite/static/js/modules/dialog.js
tree
.
└── mysite
└── static
├── js
│ └── modules
│ └── dialog.js
└── test
├── dialog-test.html
└── dialog-test.js
ToDo
- [ ] Write about Django project structure
- [ ] Write about running JS tests
License
MIT © Vladimir Rodkin