Skip to content

Commit 4fc926b

Browse files
author
krice
committed
initial
0 parents  commit 4fc926b

File tree

2,094 files changed

+193496
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,094 files changed

+193496
-0
lines changed

Sfdxtension.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const Generator = require('yeoman-generator');
2+
3+
/**
4+
* @typedef {import('@salesforce/command').SfdxCommand} SfdxCommand
5+
*/
6+
7+
/**
8+
* @typedef {object} SfdxtensionConfig
9+
* @param {object} config oclif/sfdx runtime configs
10+
* @param {SfdxCommand} command the sfdx command to which this extension is currently attached
11+
* @param {string} lifecycle 'before' or 'after' which indicates when this extension is running in relation to the sfdxCommand
12+
*/
13+
14+
class Sfdxtension extends Generator{
15+
/**
16+
* constructor
17+
* @param {Array<string>} args yeoman args
18+
* @param {SfdxtensionConfig} config
19+
*/
20+
constructor(yoArgs, sfdxContext){
21+
super(yoArgs, sfdxContext);
22+
// default desintationRoot to process.cwd()
23+
this.destinationRoot(process.cwd());
24+
// set sfdxContext
25+
let { config, Command, lifecycle } = sfdxContext;
26+
this.sfdxContext = {
27+
config,
28+
Command,
29+
lifecycle: lifecycle ? lifecycle : 'after'
30+
};
31+
}
32+
}
33+
34+
module.exports = Sfdxtension;

node_modules/.bin/node-which

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/resolve

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/semver

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/shjs

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)