Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepend option starts filename with '.' #38

Closed
kidplug opened this issue May 23, 2016 · 1 comment · Fixed by #42
Closed

prepend option starts filename with '.' #38

kidplug opened this issue May 23, 2016 · 1 comment · Fixed by #42

Comments

@kidplug
Copy link

kidplug commented May 23, 2016

The default date pattern starts with a '.' - i'm guessing for easy appending.

  this.datePattern = options.datePattern ? options.datePattern : '.yyyy-MM-dd';

When the prepend option is used, the filename winds up starting with .

in _getFilename, add the leading or trailing '.' there.

eg:

if (this.prepend) {
    return formattedDate + '.' + this._basename;
  }

  return this._basename + '.' + formattedDate;

or:

if (this.prepend) {
    return [formattedDate,this._basename].join('.');
  }

  return [this._basename,formattedDate].join('.');
@mattberther
Copy link
Member

Resolved by #42 and published to npm as v1.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants