0.0.7 • Published 2 years ago

@fidian/angular-cli-hook-example v0.0.7

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Angular-Cli-Hook-Example

A sample project to show you how to make a hook for angular-cli-hooks. It's also useful if you are diagnosing or debugging problems.

How to Include

  1. Install the hook package.

    npm install @fidian/angular-cli-hook-example
  2. Add angular-cli-hooks.json to the root of your project.

    {
        "$schema": "./node_modules/@berglund/angular-cli-hooks/schema.json",
        "hookPackage": "@fidian/angular-cli-hook-example"
    }
  3. Update your angular.json by replacing all instances of @angular-devkit/build-angular with @berglund/angular-cli-hooks.

    // Old version
    "architect": {
        "build": {
            "builder": "@angular-devkit/build-angular:browser",
            "options": {
    
    // New version
    "architect": {
        "build": {
            "builder": "@berglund/angular-cli-hooks:browser",
            "options": {
  4. Install angular-cli-hooks to allow Angular to have hooks. This also triggers the postinstall script to augment the options schemas to allow options from the hook.

    npm install @berglund/angular-cli-hooks
  5. (Optional) Add the options to configure what files are scanned and where to save the file list. By default, this does not write a file because the destination file is empty. Setting options like this will scan for TypeScript files in your projects. Add the filesToFindGlob option to control what files are scanned and writeToFile is where a file list is written. To make sure async functions work, delayMs configures how long to wait before finishing.

    "architect": {
        "build": {
            "builder": "@berglund/angular-cli-hooks:browser",
            "options": {
                "delayMs": 100,
                "filesToFindGlob": "{src,projects}/**/*.ts",
                "writeToFile": "all-files.txt",
0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago