1.2.1 • Published 5 years ago

midgard-schematics v1.2.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Midgard-schematics

Midgard-schematics is an npm package that uses @angular-devkit/schematics and gulp.js to clone the repositories of all the frontend clients in a Walhall application and auto-generate the necessary code to build a single UI.

Usage

The Walhall application will run the schematics gulp commands when it initializes (npm run init), utilizing midgard-schematics as a dev-dependency.

To use this package for local development, you need to install gulp-cli globally.

The gulp command looks like this:

gulp <taskname> --gulpfile node_modules/midgard-schematics/lib/gulpfile.js [--cwd optional_custom_execution_path]

Example:

gulp schematics --gulpfile node_modules/midgard-schematics/lib/gulpfile.js

The gulp task will clone the application's frontend clients to the projects folder in your application root, install each client as an npm package, and make the following configuration modifications:

  1. tsconfig.json: Add the client's paths to the paths object.
  2. angular.json: Add the Angular configurations of the imported client.
  3. src/tsconfig.app.json: Include the client's TypeScript files in the application's TypeScript compilation.
  4. projects/midgard-angular/src/lib/midgard-routing.module.ts: Add the client's routes to the Midgard-Angular routing component.
  5. projects/midgard-angular/src/lib/modules/store/store.ts: Add the reducers and the epics to the Midgard-Angular Redux store.
  6. [DOM]: Add exit point component to the DOM depending on the exitPointComponent defined in the Walhall application's configuration.

Available schematics rules

The aforementioned configuration modifications are carried out according to different schematics rules that can be found under src/utils:

  1. updateTsConfigRule(options): Updates tsconfig.json.
  2. addLibraryToWorkspaceFileRule(options): Updates angular.json.
  3. updateAppTsConfigRule(options): Updates src/tsconfig.app.json.
  4. addRouteRule(options): Responsible for adding routes to midgard-routing.module.ts.
  5. addAddReducersAndEpicsRule(options): Responsible for adding epics and reducers to the Redux store.
  6. addExitPointRule(options): Responsible for adding an exitPoint element to the DOM.
1.2.1

5 years ago

1.2.0

5 years ago

1.1.76

5 years ago

1.1.75

5 years ago

1.1.74

5 years ago

1.1.73

5 years ago

1.1.72

5 years ago

1.1.71

5 years ago

1.1.70

5 years ago

1.1.69

5 years ago

1.1.68

5 years ago

1.1.67

5 years ago

1.1.66

5 years ago

1.1.65

5 years ago

1.1.63

5 years ago

1.1.62

5 years ago

1.1.61

5 years ago

1.1.60

5 years ago

1.1.59

5 years ago

1.1.58

5 years ago

1.1.57

5 years ago

1.1.56

5 years ago

1.1.55

5 years ago

1.1.54

5 years ago

1.1.53

5 years ago

1.1.52

5 years ago

1.1.51

5 years ago

1.1.50

5 years ago

1.1.49

5 years ago

1.1.48

5 years ago

1.1.47

5 years ago

1.1.46

5 years ago

1.1.45

5 years ago

1.1.44

5 years ago

1.1.43

5 years ago

1.1.42

5 years ago

1.1.41

5 years ago

1.1.40

5 years ago

1.1.39

5 years ago

1.1.38

5 years ago

1.1.37

5 years ago

1.1.36

5 years ago

1.1.35

5 years ago

1.1.34

5 years ago

1.1.33

5 years ago

1.1.32

5 years ago

1.1.31

5 years ago

1.1.30

5 years ago

1.1.29

5 years ago

1.1.28

5 years ago

1.1.27

5 years ago

1.1.26

5 years ago

1.1.25

5 years ago

1.1.24

5 years ago

1.1.23

5 years ago

1.1.22

5 years ago

1.1.21

5 years ago

1.1.20

5 years ago

1.1.19

5 years ago

1.1.18

5 years ago

1.1.16

5 years ago