Update cli option descriptions. Change default filename to strings.format

This commit is contained in:
Kim Biesbjerg 2017-03-21 15:59:03 +01:00
parent 2f68bbc660
commit 7b10b246e6
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ export const cli = yargs
})
.option('patterns', {
alias: 'p',
describe: 'Input file patterns to parse',
describe: 'Extract strings from the following file patterns',
type: 'array',
default: ['/**/*.html', '/**/*.ts']
})
@ -56,7 +56,7 @@ export const cli = yargs
})
.option('sort', {
alias: 's',
describe: 'Sort translations in the output file in alphabetical order',
describe: 'Sort strings in alphabetical order when saving',
default: false,
type: 'boolean'
})

View File

@ -95,7 +95,7 @@ export class ExtractTask implements TaskInterface {
const normalizedOutput: string = path.resolve(output);
let dir: string = normalizedOutput;
let filename: string = `template.${this._compiler.extension}`;
let filename: string = `strings.${this._compiler.extension}`;
if (!fs.existsSync(normalizedOutput) || !fs.statSync(normalizedOutput).isDirectory()) {
dir = path.dirname(normalizedOutput);
filename = path.basename(normalizedOutput);