4

it's great news that Grails 3.2.1 now comes with an Angular2 profile, but I don't know how to use it.

The profile description tells me that there should be the standard command like create-domain-class, but when I create an app through

grails create-app test-ng --profile angular2

I get a working angular2 project, but it even seems that this project is not recognized as grails app. When I enter the grails cli, I only get the commands like create-app which are available outside of projects.

What am I doing wrong?

rdmueller
  • 10,742
  • 10
  • 69
  • 126
  • 2
    This is hours old, SO is probably not the best place for this topic yet :) The [Grails slack](http://slack-signup.grails.org/) is quite active but probably migrating to the new [Groovy slack](https://groovycommunity.com/), but either of those are probably your best bet. – Burt Beckwith Oct 21 '16 at 01:11

3 Answers3

4

your grails create-app test-ng --profile angular2 command should have created three folders in your test-ng-project-folder:

  • client
  • gradle
  • server

change to server and start grails command

now you should have the wellknown grails project. but i am still on the first steps of examining the new grails-profile. so i hope i could help you.

Frank Beer
  • 41
  • 4
3

Nowadays this layout is called "multi-project". Separate 4 the client and server applications. To make things easier, the tasks test, integrationTest, and bootRun have been created in the client application to make executing those tasks easier across the whole application.

Since Gradle executes tasks synchronously, and the bootRun task will never finish, it is important to execute it in parallel. At the root of the project:

./gradlew bootRun --parallel

Opening things also separately by 2 instances of your IDE or preferred text processor.

see the docs

Steven Black
  • 1,988
  • 1
  • 15
  • 25
michael
  • 46
  • 1
2
grails list-profiles

show list of available profiles, I suggest you use this because for example now angular2 profile is angular and angular1 is angularJS.

Lucke
  • 316
  • 6
  • 18