1.0.25 • Published 4 months ago

@gah/cli v1.0.25

Weekly downloads
487
License
MIT
Repository
github
Last release
4 months ago

Welcome to gah!

npm (scoped) Azure DevOps builds Azure DevOps tests Sonar Quality Gate

gahprovides tooling for working with decentralized, modular angular applications.

ToC

Features

✅ Intuitive CLI for configuring modules, hosts, dependencies, plugins and more
✅ Works with angular-CLI but is not strictly dependent on it
✅ Generates a generic host for you
✅ CI Support
✅ Reload on save features fully supported for all dependencies
✅ Pluggable: Write your own plugins to add project-specific functionality
✅ Use from code: Run the install and run commands from NodeJS scripts or from build tools like grunt

Upcoming

🆕 Multi-Repository Support
🆕 Using precompiled (npm) packages

Getting started

gah can be used both as a CLI tool and integrated into your NodeJS scripts or JS build systems.

From CLI

To use the gah-cli install the @gah/cli package globally.

// For yarn use
$ yarn global add @gah/cli
// For npm use
$ npm i -g @gah/cli

To get started you can generate an empty host with:

$ gah host init

Navigate to your angular library containing the entry module. The entry module it the module that provides the basic structure of your application. Usually containing some sort of toolbar or menu and a <router-outlet> for the other modules. Initialize the entry module with the interactive CLI:

$ gah module init --entry

If the entry module has dependencies on other modules, you have to initialize those modules now. Therefore navigate to the project folder containing the dependency. Beware that the entry module should only have dependencies to shared library modules that do not provide any routing or pages themselves, but rather have some common controls and services. You can initialize any module with the interactive module init command.

$ gah module init

Then in your entry module you can go ahead and add the dependency with the following interactive CLI command:

$ gah module dependency add

To add modules to a host, you can use the host module command in the host folder.

$ gah host module add

If your setup is complete, you can go back to the host folder and install the previously configured dependencies:

$ gah install

If everything is configured correctly, you will now be able to run the angular-cli commands for building or serving your application from the host folder, by using the gah run command:

$ gah run ng build --prod

From Code

You can also use gah install and gah run from code. See the example below.

// commonJS import style
const gah = require('@gah/cli').gah;

// ES6 import style
import { gah } from '@gah/cli';

await gah.install();

await gah.run('ng build');

Please note that all commands are executed for the current working directory of NodeJS. So for adding dependencies you first have to navigate to that folder and execute the commands there.

Plugins

gah is plugable. To add a plugin utilize gah plugin add [name]. Plugins are npm packages. The following Table contains some example plugins:

package namedescription
gah-plugin-templateAn empty example for a new plugin to get started.
gah-angular-json-pluginAdjust the generated angular.json file
gah-ie11-pluginMake the generated application compatible with IE11
gah-translation-mergerMerge multiple translation files into one (per language) eg. for ngx-translate
gah-for-root-initializerCall forRoot on selected NgModules instead of using their class name
1.0.25

4 months ago

1.0.24

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.23

2 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.7.4

3 years ago

0.7.3

3 years ago

0.7.10

3 years ago

0.7.9

3 years ago

0.7.6

3 years ago

0.7.5

3 years ago

0.7.8

3 years ago

0.7.7

3 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.6.18

3 years ago

0.6.17

3 years ago

0.7.0

3 years ago

0.6.16

3 years ago

0.6.15

3 years ago

0.6.14

3 years ago

0.6.13

3 years ago

0.6.12

3 years ago

0.6.11

3 years ago

0.6.10

3 years ago

0.6.9

3 years ago

0.6.8

3 years ago

0.6.7

3 years ago

0.6.6

3 years ago

0.6.5

3 years ago

0.6.4

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.15

3 years ago

0.5.14

3 years ago

0.5.13

3 years ago

0.5.11

3 years ago

0.5.12

3 years ago

0.5.10

3 years ago

0.5.9

3 years ago

0.5.8

3 years ago

0.5.7

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.9

3 years ago