MCPcopy
hub / github.com/lebab/lebab / getReplace

Method getReplace

src/OptionParser.js:77–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 }
76
77 getReplace() {
78 if (!this.opts().replace) {
79 return undefined;
80 }
81 if (this.opts().outFile) {
82 throw 'The --replace and --out-file options cannot be used together.';
83 }
84 if (this.program.args[0]) {
85 throw 'The --replace and plain input file options cannot be used together.\n' +
86 'Did you forget to quote the --replace parameter?';
87 }
88 if (fs.existsSync(this.opts().replace) && fs.statSync(this.opts().replace).isDirectory()) {
89 return path.join(this.opts().replace, '/**/*.js');
90 }
91 return this.opts().replace;
92 }
93
94 getTransforms() {
95 if (!this.opts().transform || this.opts().transform.length === 0) {

Callers 1

parseMethod · 0.95

Calls 1

optsMethod · 0.95

Tested by

no test coverage detected