Skip to content

nschmid/generator-jhipster-pages

 
 

Repository files navigation

generator-jhipster-pages

NPM version Build Status Dependency Status

JHipster module, create pages : client only (static), or client and server side. Load data from server, Save data to server, form, table...

Introduction

This is a JHipster module, that is meant to be used in a JHipster application.

Prerequisites

As this is a JHipster module, we expect you have JHipster and its related tools already installed:

Compatibility

Before 2.0.2 (included) it's angular 4. After 2.0.4 (included) it's angular 5. I haven't tested with micro service or any not-sql based project (cassandra, mongodb, elasticsearch, ...).

Installation

With Yarn

To install this module:

yarn global add generator-jhipster-pages

To update this module:

yarn global upgrade generator-jhipster-pages

With NPM

To install this module:

npm install -g generator-jhipster-pages

To update this module:

npm update -g generator-jhipster-pages

Usage

Launch

Launch generator and it will ask for everything it needs

yo jhipster-pages

if you want to regenerate some existing pages you can do it by page set with the following command line :

yo jhipster-pages regenerate

Core Concepts

Each page belongs to a page set. A page set is defined by a name. A Page have a name, a glyphicon, and a type. The following types are supported:

  • client only generate a simple static page :
    • empty html page
    • simple js controller
  • Load data from server generate
    • empty html page
    • js controller
    • js read service
    • java get web service
  • Save data to server generate
    • empty html page
    • js controller
    • js write service
    • java post web service
  • Load and Save data to server generate
    • empty html page
    • js controller
    • js read and write service
    • java get and post web service
  • Form generate
    • form html page
    • js controller
    • js write service
    • java post web service
    • post argument object
  • Table generate
    • table html page
    • js controller
    • js read service
    • java get web service
    • get returned object

I have generated, so what's next

you generate page but you see empty page and you have errors in ts. For some page type it's normal. The goal of this module, is just to save time by generating "plumbing" files.

Example

If you choose "Load and Save data to server" :

  • It create empty java web service and visual object.
  • You can see a new entry in your navbar wich target an empty html page.
  • You have js/ts controller is there but don't call the js/ts service to load or save data.
  • It's now you turn to code...

Road Map

Here is the list of types to do

  • reactjs client side

License

Apache License v2.0 © Guillaume DUFOUR

About

sub generator for forms

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 44.2%
  • JavaScript 33.5%
  • TypeScript 10.8%
  • Java 8.3%
  • Scala 3.2%