npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@awdware/gah

v0.4.7

Published

Generic Angular Host Tooling

Downloads

181

Readme

Welcome to gah!

cli npm version Build Status Quality Gate Status shared npm version Quality Gate Status

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 @awdware/gah package globally.

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

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('@awdware/gah').gah;

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

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 name | description | |---------------------------------------------------------------------------------|--------------------------------------------------------------------------------| | gah-plugin-template | An empty example for a new plugin to get started. | | gah-angular-json-plugin | Adjust the generated angular.json file | | gah-ie11-plugin | Make the generated application compatible with IE11 | | gah-translation-merger | Merge multiple translation files into one (per language) eg. for ngx-translate | | gah-for-root-initializer | Call forRoot on selected NgModules instead of using their class name |