generator-silmarilli

0.2.1 • Public • Published

Silmarilli Build Status

The Noldor also it was who first achieved the making of gems; and the fairest of gems were the Silmarils, and they are lost.

— J.R.R. Tolkien, The Silmarillion

This is a collection of the most brilliant gems out there, forged into a powerful building tool.

Warning: still work in progress and not ready for usage yet!

The gems

Silmarilli is packaged as a Yeoman generator – generator-silmarilli. It scaffolds your application consisting of a Django REST API server connected to a PostgreSQL database and an AngularJS web app.

The following gems are included in Silmarilli:

How is this possible? Through the magic of composability, copying files based on template rendering and glob expressions. A good example of composability is generator-generator being composed of generator-node.

Getting Started

To begin, your computer first needs node.js. Once you have that, we need Yeoman pre-installed. Yeoman lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive.

npm install -g yo

Then, we need the Silmarilli generator, i.e. plug-in. You install generator-silmarilli from npm.

npm install -g generator-silmarilli

Finally, for every new project you would initiate the generator in an empty folder.

mkdir magic-project
cd magic-project
yo silmarilli

You will be prompted for some questions. You can optionally pass in the project name as an argument (you'll be asked for it otherwise).

yo silmarilli magic-project

If you want to skip generating the Angular code, pass the --skip-angular flag.

yo silmarilli awesome-project --skip-angular

See all of the available options by running the help flag.

yo silmarilli --help

Development

Locally

If you didn't pass --skip-install, Yeoman will run npm install and bower install for you. After this, start the development environment using

gulp serve

Using Docker

Install Docker Compose.

When necessary, run the migrations:

docker-compose run web ./manage.py migrate

afterwards, you can get the development server up and running by simply running:

docker-compose up

Now, open your browser at http://localhost:8000 or check the ip address with boot2docker ip if you're on OS X.

License

Original code GPLv3, for the included components see LICENSE.md.

TODO

  • fill out django-compose.yml
  • use something more simliar to Jinja to render {% if %} tags in Cookiecutter -> probably cookiecutter directly to handle {% raw %} tags
  • Cookiecutter-django as subtree or submodule (probably submodule to KIS...)
  • set other cookiecutter-django settings as options (author_name etc.)
  • properly prompt the subgenerator http://stackoverflow.com/questions/28520937/
  • add local cookiecutterrc support to cookiecutter/cookiecutter/config.py

Readme

Keywords

Package Sidebar

Install

npm i generator-silmarilli

Weekly Downloads

0

Version

0.2.1

License

GPL-3.0

Last publish

Collaborators

  • metakermit