top of page
Search

JHipster

  • Writer: Kiazsoft
    Kiazsoft
  • May 22, 2020
  • 1 min read

Updated: Nov 29, 2020

Install JHipster using npm

npm install -g generator-jhipster

Create JHipster Application



mkdir myapp
cd myapp
hipster
Ref - https://www.jhipster.tech/creating-an-app/

Display fa-icons in Jhipster applications

For Jhipster 6 the file to define new icons to be used is src/main/webapp/app/core/icons/font-awesome-icons.ts
import {
...
faUpload
} from '@fortawesome/free-solid-svg-icons';
export const fontAwesomeIcons = [
...
faUpload
];
-----------------------------------------------------------
Usage in html 
<fa-icon icon="upload"></fa-icon>

Adding new entity

jhipster entity entityName

Update existing entity

yo jhipster:entity entityName
This will prompt for details about adding/removing new fields and relationship.

Update an existing entity by updating the <entity>.json fine under .jhipster folder.

Once you make necessary changes to your <entity>.json file under .jhipster folder for you project. You can run below command to regenerate the entity.

% jHipster entity entityName
? Do you want to update the entity? This will replace the existing files for this entity, all your custom code will be overwritten (Use arrow keys)
❯ Yes, re generate the entity 
  Yes, add more fields and relationships
  Yes, remove fields and relationships 
  No, exit

Export jdl file from existing JHipster application

jhipster export-jdl

Creating all project files from jdl file by importing

jhipster import-jdl <jdl file>

The jdl file configuration define settings for application code generation.
for e.g. clientFramework react/AngularX

Updating bootswatch theme for your existing jhipster application

Update - src/main/webapp/content/scss/vendor.scss
2 lines with bootswatch should be updated with the theme name.
Below darkly is the active theme name
/* after changing this file run 'npm run webpack:build' */

/***************************
put Sass variables here:
eg $input-color: red;
****************************/
@import '~bootswatch/dist/darkly/variables';
// Override Bootstrap variables
@import 'bootstrap-variables';
// Import Bootstrap source files from node_modules
@import '~bootstrap/scss/bootstrap';
@import '~bootswatch/dist/darkly/bootswatch';

/* jhipster-needle-scss-add-vendor JHipster will add new css style */


 
 
 

Recent Posts

See All
Git

Removing file from all history. git filter-branch --force --index-filter \ "git rm --cached --ignore-unmatch PATH-TO-FILE" \...

 
 
 
MongoDB

Mongo Sample find query db.getCollection("user").find( { "username" : "kia" }, {//projections "username": 1.0, //1.0 means include...

 
 
 

Comments


©2022 KIAZSOFT CONSULTING INC

bottom of page