Module: SfCli::Sf::Project::Generate
- Included in:
- Core
- Defined in:
- lib/sf_cli/sf/project/generate.rb
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
-
#generate(name, manifest: false, template: nil, output_dir: nil, raw_output: false) ⇒ Result
Generate a Salesforce DX project.
Instance Method Details
#generate(name, manifest: false, template: nil, output_dir: nil, raw_output: false) ⇒ Result
Generate a Salesforce DX project
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/sf_cli/sf/project/generate.rb', line 17 def generate(name, manifest: false, template: nil, output_dir: nil, raw_output: false) flags = { :name => name, :template => template, :"output-dir" => output_dir, } switches = { manifest: manifest, } command_output_format = raw_output ? :human : :json redirect_type = raw_output ? nil : :null_stderr output = exec(__method__, flags: flags, switches: switches, redirection: redirect_type, raw_output: raw_output, format: command_output_format) return output if raw_output Result.new( output_dir: output['result']['outputDir'], files: output['result']['created'], raw_output: output['result']['rawOutput'], warnings: output['warnings'] ) end |