|
| 1 | +/** |
| 2 | + * Defines configuration used by core Heft. |
| 3 | + */ |
| 4 | +{ |
| 5 | + "$schema": "https://developer.microsoft.com/json-schemas/heft/heft.schema.json", |
| 6 | + |
| 7 | + /** |
| 8 | + * Optionally specifies another JSON config file that this file extends from. This provides a way for standard |
| 9 | + * settings to be shared across multiple projects. |
| 10 | + */ |
| 11 | + "extends": "@rushstack/heft-node-rig/profiles/default/config/heft.json", |
| 12 | + |
| 13 | + "eventActions": [ |
| 14 | + // { |
| 15 | + // /** |
| 16 | + // * (Required) The kind of built-in operation that should be performed. |
| 17 | + // * The "deleteGlobs" action deletes files or folders that match the specified glob patterns. |
| 18 | + // */ |
| 19 | + // "actionKind": "deleteGlobs", |
| 20 | + // |
| 21 | + // /** |
| 22 | + // * (Required) The Heft stage when this action should be performed. Note that heft.json event actions |
| 23 | + // * are scheduled after any plugin tasks have processed the event. For example, a "compile" event action |
| 24 | + // * will be performed after the TypeScript compiler has been invoked. |
| 25 | + // * |
| 26 | + // * Options: "clean", "pre-compile", "compile", "bundle", "post-build" |
| 27 | + // */ |
| 28 | + // "heftEvent": "clean", |
| 29 | + // |
| 30 | + // /** |
| 31 | + // * (Required) A user-defined tag whose purpose is to allow configs to replace/delete handlers that |
| 32 | + // * were added by other configs. |
| 33 | + // */ |
| 34 | + // "actionId": "my-example-action", |
| 35 | + // |
| 36 | + // /** |
| 37 | + // * (Required) Glob patterns to be deleted. The paths are resolved relative to the project folder. |
| 38 | + // * Documentation for supported glob syntaxes: https://www.npmjs.com/package/fast-glob |
| 39 | + // */ |
| 40 | + // "globsToDelete": [ |
| 41 | + // "dist", |
| 42 | + // "lib", |
| 43 | + // "lib-esnext", |
| 44 | + // "temp" |
| 45 | + // ] |
| 46 | + // }, |
| 47 | + // |
| 48 | + // { |
| 49 | + // /** |
| 50 | + // * (Required) The kind of built-in operation that should be performed. |
| 51 | + // * The "copyFiles" action copies files that match the specified patterns. |
| 52 | + // */ |
| 53 | + // "actionKind": "copyFiles", |
| 54 | + // |
| 55 | + // /** |
| 56 | + // * (Required) The Heft stage when this action should be performed. Note that heft.json event actions |
| 57 | + // * are scheduled after any plugin tasks have processed the event. For example, a "compile" event action |
| 58 | + // * will be performed after the TypeScript compiler has been invoked. |
| 59 | + // * |
| 60 | + // * Options: "pre-compile", "compile", "bundle", "post-build" |
| 61 | + // */ |
| 62 | + // "heftEvent": "pre-compile", |
| 63 | + // |
| 64 | + // /** |
| 65 | + // * (Required) A user-defined tag whose purpose is to allow configs to replace/delete handlers that |
| 66 | + // * were added by other configs. |
| 67 | + // */ |
| 68 | + // "actionId": "my-example-action", |
| 69 | + // |
| 70 | + // /** |
| 71 | + // * (Required) An array of copy operations to run perform during the specified Heft event. |
| 72 | + // */ |
| 73 | + // "copyOperations": [ |
| 74 | + // { |
| 75 | + // /** |
| 76 | + // * (Required) The base folder that files will be copied from, relative to the project root. |
| 77 | + // * Settings such as "includeGlobs" and "excludeGlobs" will be resolved relative |
| 78 | + // * to this folder. |
| 79 | + // * NOTE: Assigning "sourceFolder" does not by itself select any files to be copied. |
| 80 | + // */ |
| 81 | + // "sourceFolder": "src", |
| 82 |
6D4E
+ // |
| 83 | + // /** |
| 84 | + // * (Required) One or more folders that files will be copied into, relative to the project root. |
| 85 | + // * If you specify more than one destination folder, Heft will read the input files only once, using |
| 86 | + // * streams to efficiently write multiple outputs. |
| 87 | + // */ |
| 88 | + // "destinationFolders": ["dist/assets"], |
| 89 | + // |
| 90 | + // /** |
| 91 | + // * If specified, this option recursively scans all folders under "sourceFolder" and includes any files |
| 92 | + // * that match the specified extensions. (If "fileExtensions" and "includeGlobs" are both |
| 93 | + // * specified, their selections are added together.) |
| 94 | + // */ |
| 95 | + // "fileExtensions": [".jpg", ".png"], |
| 96 | + // |
| 97 | + // /** |
| 98 | + // * A list of glob patterns that select files to be copied. The paths are resolved relative |
| 99 | + // * to "sourceFolder". |
| 100 | + // * Documentation for supported glob syntaxes: https://www.npmjs.com/package/fast-glob |
| 101 | + // */ |
| 102 | + // "includeGlobs": ["assets/*.md"], |
| 103 | + // |
| 104 | + // /** |
| 105 | + // * A list of glob patterns that exclude files/folders from being copied. The paths are resolved relative |
| 106 | + // * to "sourceFolder". These exclusions eliminate items that were selected by the "includeGlobs" |
| 107 | + // * or "fileExtensions" setting. |
| 108 | + // */ |
| 109 | + // "excludeGlobs": [], |
| 110 | + // |
| 111 | + // /** |
| 112 | + // * Normally, when files are selected under a child folder, a corresponding folder will be created in |
| 113 | + // * the destination folder. Specify flatten=true to discard the source path and copy all matching files |
| 114 | + // * to the same folder. If two files have the same name an error will be reported. |
| 115 | + // * The default value is false. |
| 116 | + // */ |
| 117 | + // "flatten": false, |
| 118 | + // |
| 119 | + // /** |
| 120 | + // * If true, filesystem hard links will be created instead of copying the file. Depending on the |
| 121 | + // * operating system, this may be faster. (But note that it may cause unexpected behavior if a tool |
| 122 | + // * modifies the link.) The default value is false. |
| 123 | + // */ |
| 124 | + // "hardlink": false |
| 125 | + // } |
| 126 | + // ] |
| 127 | + // } |
| 128 | + |
| 129 | + { |
| 130 | + "actionKind": "copyFiles", |
| 131 | + "heftEvent": "pre-compile", |
| 132 | + "actionId": "copy-test-assets", |
| 133 | + |
| 134 | + "copyOperations": [ |
| 135 | + { |
| 136 | + "sourceFolder": "src", |
| 137 | + "destinationFolders": ["lib"], |
| 138 | + "fileExtensions": [".lock"] |
| 139 | + } |
| 140 | + ] |
| 141 | + } |
| 142 | + ], |
| 143 | + |
| 144 | + /** |
| 145 | + * The list of Heft plugins to be loaded. |
| 146 | + */ |
| 147 | + "heftPlugins": [ |
| 148 | + // { |
| 149 | + // /** |
| 150 | + // * The path to the plugin package. |
| 151 | + // */ |
| 152 | + // "plugin": "path/to/my-plugin", |
| 153 | + // |
| 154 | + // /** |
| 155 | + // * An optional object that provides additional settings that may be defined by the plugin. |
| 156 | + // */ |
| 157 | + // // "options": { } |
| 158 | + // } |
| 159 | + ] |
| 160 | +} |
0 commit comments