|
20 | 20 |
|
21 | 21 | * Clone the application and open application as a sbt project.
|
22 | 22 |
|
23 |
| -* This application is not using any of the java play views and all the views are served by the [Angular](https://angular.io/) code base which is inside the `ui` folder. |
| 23 | +* This application is not using any of the scala play views and all the views are served by the [Angular](https://angular.io/) code base which is inside the `ui` folder. |
24 | 24 |
|
25 | 25 | * Used any of the sbt commands listed in the below according to the requirement which are working fine with this application.(To see more details of [sbt](http://www.scala-sbt.org/))
|
26 | 26 |
|
|
35 | 35 |
|
36 | 36 | sbt test # Run both backend and frontend unit tests
|
37 | 37 | ```
|
| 38 | + |
| 39 | +## Complete Directory Layout |
| 40 | + |
| 41 | +``` |
| 42 | +├── /app/ # The backend (scala) application sources (controllers, models, views, assets) |
| 43 | +├── /conf/ # Configurations files and other non-compiled resources (on classpath) |
| 44 | +│ ├── application.conf # Builds the project from source to output(lib and bower) folder |
| 45 | +│ ├── logback.xml # Logging configuration |
| 46 | +│ └── routes # Routes definition |
| 47 | +├── /logs/ # Logs folder |
| 48 | +│ └── application.log # Default log file |
| 49 | +├── /project/ # Sbt configuration files |
| 50 | +│ ├── AngularBuild.scala # PlayRunHook file to trigger angular serve with sbt run |
| 51 | +│ ├── build.properties # Marker for sbt project |
| 52 | +│ └── plugins.sbt # Sbt plugins declaration |
| 53 | +├── /public/ # Public assets |
| 54 | +│ └── /ui/ # Frontend build assests |
| 55 | +├── /target/ # Generated stuff |
| 56 | +│ ├── /universal/ # Application packaging |
| 57 | +│ └── /web/ # Compiled web assets |
| 58 | +├── /test/ # Contains unit tests for scala play sources |
| 59 | +├── /ui/ # Angular front end sources |
| 60 | +│ ├── /e2e/ # End to end tests folder |
| 61 | +│ ├── /node_modules/ # 3rd-party frontend libraries and utilities |
| 62 | +│ ├── /src/ # The frontend source code (modules, componensts, models, directives, services etc.) of the application |
| 63 | +│ ├── .angular-cli.json # Builds the project from source to output(lib and bower) folder |
| 64 | +│ ├── .editorconfig # Define and maintain consistent coding styles between different editors and IDEs |
| 65 | +│ ├── .gitignore # Contains ui files to be ignored when pushing to git |
| 66 | +│ ├── karma.conf.js # Karma configuration file |
| 67 | +│ ├── package.json # Holds various metadata configuration relevant to the ui |
| 68 | +│ ├── protractor.conf.js # Protractor configuration file |
| 69 | +│ ├── proxy.conf.json # UI proxy configuration |
| 70 | +│ ├── README.md # Contains all user guide details for the ui |
| 71 | +│ ├── tsconfig.json # Contains typescript compiler options |
| 72 | +│ └── tslint.json # Lint rules for the ui |
| 73 | +├── .gitignore # Contains files to be ignored when pushing to git |
| 74 | +├── build.sbt # Play application build script |
| 75 | +├── LICENSE # Contains License Agreement file |
| 76 | +├── README.md # Contains all user guide details for the application |
| 77 | +└── ui-build.sbt # UI build scripts |
| 78 | +``` |
| 79 | + |
| 80 | +## What is new in here? |
| 81 | + |
| 82 | +### AngularBuild.scala |
| 83 | + |
| 84 | +* Represents PlayRunHook scala implementation to trigger angular serve with sbt run command. |
| 85 | + |
| 86 | +``` |
| 87 | + ├── /project/ |
| 88 | + │ ├── AngularBuild.scala |
| 89 | +``` |
| 90 | + |
| 91 | +### ui-build.sbt |
| 92 | + |
| 93 | +* `ui-build.sbt` file to represent UI builds scrips implementations to run along with the available sbt commands. |
| 94 | +* This file is located in the root level of the project to work smoothly with the `build.sbt` file. |
| 95 | + |
| 96 | +### npm run commands |
| 97 | + |
| 98 | +* Added several new npm run commands in the `scripts` section of the package.json file in order to work smoothly with the sbt commands. |
| 99 | +* Check [UI README.md](./ui/README.md) to see the available front end build tasks. |
| 100 | + |
| 101 | +``` |
| 102 | +├── /ui/ |
| 103 | +│ ├── package.json |
| 104 | +``` |
| 105 | + |
| 106 | +### proxy.conf.json |
| 107 | + |
| 108 | +* Contains proxy configurations required to run application in watch mode along with both `Scala` and `Angular` builds. |
| 109 | + |
| 110 | +``` |
| 111 | +├── /ui/ |
| 112 | +│ ├── proxy.conf.json |
| 113 | +``` |
| 114 | + |
38 | 115 | ## Routes
|
39 | 116 |
|
40 | 117 | ```
|
|
0 commit comments