Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #29 from satazor/keep-filename-dir
Browse files Browse the repository at this point in the history
Fix dir of the filename not being preserved
  • Loading branch information
arthurbergmz authored Dec 14, 2017
2 parents 63b40dd + de40461 commit dbf0e4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/Injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function manifest(options, publicPath, icons, callback) {
delete content.ios;
var json = JSON.stringify(content, null, 2);
var filename = _path2.default.parse(options.filename);
var output = options.fingerprints ? filename.name + '.' + (0, _Fingerprint2.default)(json) + filename.ext : '' + filename.name + filename.ext;
var output = _path2.default.join(filename.dir, options.fingerprints ? filename.name + '.' + (0, _Fingerprint2.default)(json) + filename.ext : '' + filename.name + filename.ext);
callback(null, {
output: output,
file: (0, _URI.joinURI)(publicPath, output),
Expand Down
5 changes: 4 additions & 1 deletion src/Injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ function manifest (options, publicPath, icons, callback) {
delete content.ios
const json = JSON.stringify(content, null, 2)
const filename = path.parse(options.filename)
const output = options.fingerprints ? `${filename.name}.${generateFingerprint(json)}${filename.ext}` : `${filename.name}${filename.ext}`
const output = path.join(
filename.dir,
options.fingerprints ? `${filename.name}.${generateFingerprint(json)}${filename.ext}` : `${filename.name}${filename.ext}`
)
callback(null, {
output,
file: joinURI(publicPath, output),
Expand Down

0 comments on commit dbf0e4d

Please sign in to comment.