yeoman-generator 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter.d.ts +2 -0
- package/dist/adapter.js +9 -0
- package/dist/generator.js +3 -2
- package/package.json +1 -1
package/dist/adapter.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const adapterProgress = async (adapter, fn, options) => {
|
|
2
|
+
if ('progress' in adapter) {
|
|
3
|
+
return adapter.progress(fn, options);
|
|
4
|
+
}
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
6
|
+
return Promise.resolve(fn({ step() { } })).finally(() => {
|
|
7
|
+
adapter.log.ok(options?.name);
|
|
8
|
+
});
|
|
9
|
+
};
|
package/dist/generator.js
CHANGED
|
@@ -135,11 +135,12 @@ export class BaseGenerator extends EventEmitter {
|
|
|
135
135
|
}
|
|
136
136
|
// Add convenience debug object
|
|
137
137
|
this._debug = createDebug(this._namespace);
|
|
138
|
+
// Ensure source/destination path, can be configured from subclasses
|
|
139
|
+
// Used by help()
|
|
140
|
+
this.sourceRoot(path.join(path.dirname(this.resolved), 'templates'));
|
|
138
141
|
if (actualOptions.help) {
|
|
139
142
|
return;
|
|
140
143
|
}
|
|
141
|
-
// Ensure source/destination path, can be configured from subclasses
|
|
142
|
-
this.sourceRoot(path.join(path.dirname(this.resolved), 'templates'));
|
|
143
144
|
if (this.features.unique && !this.features.uniqueBy) {
|
|
144
145
|
let uniqueBy;
|
|
145
146
|
if (this.features.unique === true || this.features.unique === 'namespace') {
|