Skip to content

Commit

Permalink
FEAT: startFromStaticDir config to change baseFolder.
Browse files Browse the repository at this point in the history
  • Loading branch information
LuXDAmore committed Dec 6, 2019
1 parent d487756 commit 93099c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const moduleName = 'apis-to-file'
name: 'data',
ext: 'json',
path: moduleName,
startFromStaticDir: false,
options: {},
},
hideErrorsInConsole: false,
Expand Down Expand Up @@ -168,7 +169,7 @@ export default async function(
// File generator
const completeFilePath = resolve(
__dirname,
`${ this.options.srcDir }/${ options.file.path }/${ options.dir || '' }/${ options.file.name }.${ options.file.ext }`,
`${ options.file.startFromStaticDir ? this.options.dir.static : this.options.srcDir }/${ options.file.path }/${ options.dir || '' }/${ options.file.name }.${ options.file.ext }`,
);

try {
Expand Down

0 comments on commit 93099c3

Please sign in to comment.