Skip to content

Commit

Permalink
Merged in v5.0.1 (pull request #44)
Browse files Browse the repository at this point in the history
Improvements to PDF Artifacts


Former-commit-id: fa666232297a8711fdc2f8ff85a63175b43e64b3
  • Loading branch information
mraible committed Dec 20, 2018
2 parents 151ed17 + e10b9a9 commit ad8eaea
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 203 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ This document provides a high-level view of the changes introduced in the JHipst
For a detailed view of what has changed, refer to the https://bitbucket.org/mraible/jhipster-book/commits/all[commit history] on Bitbucket.

// tag::compact[]
== 5.0.1 (2018-11-26) - @mraible
== 5.0.1 (2018-12-19) - @mraible
Changes::
* Fixed typo reported by Gregory Gerard (@ggerard). `"[(ngModule)]"` should be `"[(ngModel)]"`.
* Removed duplicate preface and introduction.
* Changed all lists to align left, as well as some paragraphs with large spaces.
* Removed links where no value was added.

== 5.0.0 (2018-11-05) - @mraible
Changes::
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source 'https://rubygems.org'

gem 'coderay'
gem 'Ascii85'
gem 'asciidoctor-pdf', github: 'asciidoctor/asciidoctor-pdf', ref: '03ceac32e426421ebd6ef2499a14f5aac40ec47b'
gem 'asciidoctor-pdf', github: 'asciidoctor/asciidoctor-pdf', ref: 'a92ef7e7f7ecc862c2db4f5a4a46d66d0c1f111c'
5 changes: 2 additions & 3 deletions src/docs/asciidoc/chapters/about.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

Matt Raible is a Java Hipster. He grew up in the backwoods of Montana with no electricity or running water. He walked a mile and a half to the bus stop on school days. His mom and sister often led the early-morning hikes, but his BMX skills overcame this handicap later in life.

He started writing HTML, CSS, and JavaScript in the early '90s and got into Java in the late '90s. He loves the Volkswagen Bus, like no one should love anything. He has a passion for skiing, mountain biking, VWs, and good beer. Matt is married to an awesome woman and amazing photographer, http://www.mcginityphoto.com/[Trish McGinity]. They love skiing, rafting, and camping with their fun-loving kids, Abbie and Jack.
He started writing HTML, CSS, and JavaScript in the early '90s and got into Java in the late '90s. He loves the Volkswagen Bus, like no one should love anything. He has a passion for skiing, mountain biking, VWs, and good beer. Matt is married to an awesome woman and amazing photographer, Trish McGinity. They love skiing, rafting, and camping with their fun-loving kids, Abbie and Jack.
image::about/family.jpg[The Raible Family, 400, scaledwidth=50%, align=center]
Matt's blog is at http://raibledesigns.com[raibledesigns.com]. You can also find him on Twitter at
http://twitter.com/mraible[@mraible]. Matt drives a 1966 21-Window Bus and a 1990 Vanagon Syncro.
Matt's blog is at raibledesigns.com. You can also find him on Twitter @mraible. Matt drives a 1966 21-Window Bus and a 1990 Vanagon Syncro.
image::about/bus-and-van.jpg[The Bus and the Syncro, 800, scaledwidth=72%, align=center]
4 changes: 2 additions & 2 deletions src/docs/asciidoc/chapters/action.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Deepu K Sasidharan and Sendil Kumar N, two prolific committers on the JHipster t

The definitive book about Spring's JDBC, JPA, and NoSQL support is http://shop.oreilly.com/product/0636920024767.do[_Spring Data: Modern Data Access for Enterprise Java_] by Mark Pollack _et al._ (O'Reilly Media, October 2012).

Learn how to use Spring Boot to build apps faster than ever before with https://www.packtpub.com/application-development/learning-spring-boot[_Learning Spring Boot_] by Greg L. Turnquist (Packt Publishing, November 2014).
Learn how to use Spring Boot to build apps faster than ever before with https://www.packtpub.com/application-development/learning-spring-boot-20-second-edition[_Learning Spring Boot 2.0_] by Greg L. Turnquist (Packt Publishing, November 2017).

An in-depth and up-to-date book on Angular is https://www.ng-book.com/2/[_ng-book: The Complete Guide to Angular 4_] by by Nathan Murray, Felipe Coury, Ari Lerner, and Carlos Taborda) (Fullstack.io, April 2017).
An in-depth and up-to-date book on Angular is https://www.ng-book.com/2/[_ng-book: The Complete Book on Angular_] by Nathan Murray, Felipe Coury, Ari Lerner, and Carlos Taborda) (Fullstack.io, November 2018).

Learn how to develop cloud-ready JVM applications and microservices across a variety of environments with http://shop.oreilly.com/product/0636920038252.do[_Cloud Native Java: Designing Resilient Systems with Spring Boot, Spring Cloud, and Cloud Foundry_] by Josh Long and Kenny Bastani (O'Reilly Media, August 2017).
161 changes: 20 additions & 141 deletions src/docs/asciidoc/chapters/chapter2.adoc

Large diffs are not rendered by default.

37 changes: 17 additions & 20 deletions src/docs/asciidoc/chapters/chapter3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@ This section shows how JHipster includes all of these UI components for you and
JHipster supports two UI frameworks: Angular and React. In the first two versions of this book, I showed you how to use AngularJS. In the last two versions (4.0 and 4.5), I showed you how to use Angular. Since this is a mini-book, I'm going to stick with showing Angular only. You can see from the following graphs that Angular and React are the most popular among JavaScript frameworks.
[.clearfix]
--
[.left]
[[img-angular-jobs-2018]]
.Jobs on Indeed, September 2018
image::chapter3/angular/indeed-jobs-sep2018.jpg[Jobs on Indeed, 450, scaledwidth=75%]
[.left]
image::chapter3/angular/indeed-jobs-sep2018.jpg[Jobs on Indeed, 450, scaledwidth=75%, align=center]
[[img-stackoverflow-tags-2018]]
.Stack Overflow Tags, September 2018
image::chapter3/angular/stackoverflow-tags-sep2018.jpg[Tags on Stack OverFlow, 450, scaledwidth=75%]
--
image::chapter3/angular/stackoverflow-tags-sep2018.jpg[Tags on Stack OverFlow, 450, scaledwidth=75%, align=center]
Angular is the default UI framework used by JHipster. It's written in TypeScript, compiles to JavaScript, and just using it makes you a hipster! Like Struts in the early 2000s and Rails in the mid-2000s, Angular and other JavaScript frameworks have changed the way developers write web applications. Today, data is exposed via REST APIs and UIs are written in JavaScript (or TypeScript). As a Java developer, I was immediately attracted to Angular when I saw its separation of concerns. It recommended organizing your application into several different components:
Expand All @@ -44,11 +40,11 @@ A new syntax was introduced that binds data to element properties, not attribute
<input type="checkbox" [checked]="someProperty">
----
In March 2015, the Angular team http://www.infoq.com/news/2015/03/angular-2-concerns-addressed[addressed community concerns], announcing that they would be using http://www.typescriptlang.org/[TypeScript] over AtScript and that they would provide a migration path for Angular 1.x users. They also adopted semantic versioning and http://angularjs.blogspot.com/2017/01/branding-guidelines-for-angular-and.html[recommended people call it "Angular" instead of Angular 2.0].
In March 2015, the Angular team http://www.infoq.com/news/2015/03/angular-2-concerns-addressed[addressed community concerns], announcing that they would be using TypeScript over AtScript and that they would provide a migration path for Angular 1.x users. They also adopted semantic versioning and http://angularjs.blogspot.com/2017/01/branding-guidelines-for-angular-and.html[recommended people call it "Angular" instead of Angular 2.0].
Angular 2.0 was released September 2016. Angular 4.0 was released March 2017. https://www.jhipster.tech/2017/07/06/jhipster-release-4.6.0.html[JHipster 4.6.0] was released July 6, 2017 and was the first release to contain production-ready Angular support. JHipster 5 uses Angular 6. Angular https://www.infoq.com/news/2018/11/angular-7[released version 7] during the production of this book.
Angular 2.0 was released September 2016. Angular 4.0 was released March 2017. JHipster 4.6.0 was released July 6, 2017 and was the first release to contain production-ready Angular support. JHipster 5 uses Angular 6. Angular released version 7 during the production of this book.
You can find the Angular project at https://angular.io/[https://angular.io].
You can find the Angular project at https://angular.io.
=== Basics
Creating a component that says "Hello World" with Angular is pretty simple.
Expand Down Expand Up @@ -228,7 +224,7 @@ In the main entry point of the app, `AppComponent` in this case, you'll need to
The template for the `SearchComponent` can be as simple as a form with a button.
[source,html]
[source%autofit,html]
----
<h2>Search</h2>
<form>
Expand Down Expand Up @@ -482,20 +478,21 @@ The media queries effect screen widths with the given breakpoint or _larger_. Fo
The following example from 21-Points Health shows how to display a shorter heading on mobile and a larger one on bigger screens.
[source,html]
[source%autofit,html]
----
<div class="col-6 text-nowrap">
<h4 class="mt-1 d-none d-md-inline"
jhiTranslate="home.bloodPressure.title">Blood Pressure:</h4>
<h4 class="mt-1 d-sm-none" jhiTranslate="home.bloodPressure.titleMobile">BP:</h4>
<h4 class="mt-1 d-sm-none"
jhiTranslate="home.bloodPressure.titleMobile">BP:</h4>
</div>
----
=== Forms
When you add Bootstrap's CSS to your web application, chances are it'll quickly start to look better. Typography, margins, and padding will look better by default. However, your forms might look funny, because Bootstrap requires a few classes on your form elements to make them look good. Below is an example of a form element.
[source,html]
[source%autofit,html]
----
include::{sourcedir}/chapter3/bootstrap/basicelement.html[]
----
Expand All @@ -506,7 +503,7 @@ image::chapter3/bootstrap/basicelement.png[Basic form element, 712, scaledwidth=
If you'd like to indicate that this form element is not valid, you'll need to modify the above HTML to display validation warnings.
[source,html]
[source%autofit,html]
----
include::{sourcedir}/chapter3/bootstrap/basicelement-withvalidation.html[]
----
Expand Down Expand Up @@ -548,7 +545,7 @@ image::chapter3/bootstrap/navbar-on-mobile.png[Navbar on mobile, 476, scaledwidt
This navbar requires quite a bit of HTML markup, not shown here for the sake of brevity. You can view this source online in link:https://getbootstrap.com/docs/4.1/components/navbar/[Bootstrap's documentation]. A simpler example below shows the basic structure.
[source,html]
[source%autofit,html]
----
include::{sourcedir}/chapter3/bootstrap/navbar.html[]
----
Expand All @@ -568,7 +565,7 @@ image::chapter3/bootstrap/alerts.png[Alerts, 776, scaledwidth=100%]
To make an alert closeable, you need to add an `.alert-dismissible` class and a close button.
[source,html]
[source%autofit,html]
----
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Warning!</strong> Better check yourself, you're not looking too good.
Expand Down Expand Up @@ -635,7 +632,7 @@ There's also a `src/main/webapp/content/scss/_bootstrap-variable.scss` file. You
JHipster includes https://ng-bootstrap.github.io/[ng-bootstrap] by default. This library provides Bootstrap 4 components that are powered by Angular instead of jQuery.
http://codeseven.github.io/toastr/[Toastr] is a popular non-blocking notification library powered by jQuery. JHipster has an https://github.com/jhipster/ng-jhipster/blob/master/src/service/alert.service.ts[alert.service.ts] that allows you to use Toastr-like alerts.
http://codeseven.github.io/toastr/[Toastr] is a popular non-blocking notification library powered by jQuery. JHipster has an https://github.com/jhipster/ng-jhipster/blob/master/src/service/alert.service.ts[`alert.service.ts`] that allows you to use Toastr-like alerts.
To use Toastr-like alerts in your project, modify `shared-libs.module.ts` to change `alertAsToast` to `true`.
Expand All @@ -655,7 +652,7 @@ To use Toastr-like alerts in your project, modify `shared-libs.module.ts` to cha
CookieModule.forRoot(),
FontAwesomeModule
],
exports: [FormsModule, CommonModule, NgbModule, NgJhipsterModule, InfiniteScrollModule, FontAwesomeModule]
exports: [ ... ]
})
----
Expand Down Expand Up @@ -827,7 +824,7 @@ const config = {
module.exports = config;
----
In the Angular section, I mentioned Angular CLI and my https://github.com/mraible/ng-demo[ng-demo] project that shows how to use it. Angular CLI uses webpack internally, but you never see it because it wraps everything in its `ng` command. To see its webpack config, or to tweak it for your needs, you can _eject_ it from your project by running https://github.com/angular/angular-cli/wiki/eject["`ng eject`"].
In the Angular section, I mentioned Angular CLI and my https://github.com/mraible/ng-demo[ng-demo] project that shows how to use it. Angular CLI uses webpack internally, but you never see it because it wraps everything in its `ng` command. To see its webpack config, or to tweak it for your needs, you can _eject_ it from your project by running `ng eject`.
I tried running this and found it added 20 dependencies to the project's `package.json` and generated a `webpack.config.js` file that's over 450 lines of code! This is roughly equivalent to the lines of code in a JHipster project's webpack configuration. JHipster generates a `webpack` directory that contains files for different scenarios: dev mode with hot reload, testing, and preparing for production.
Expand Down
Loading

0 comments on commit ad8eaea

Please sign in to comment.