Skip to content

Commit

Permalink
Only 1 string literal per require
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Burstain committed May 17, 2018
1 parent b611875 commit ee6ca80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var gitSemverTags = require("git-semver-tags"),
minimist = require("minimist");

var basedir = path.join(__dirname, "..");
var pkg = require(basedir + "/package.json");
var pkg = require(path.join(basedir, "package.json");

var argv = minimist(process.argv, {
alias: {
Expand Down Expand Up @@ -129,7 +129,7 @@ gitSemverTags(function(err, tags) {
});
var current;
try {
current = fs.readFileSync(basedir + "/CHANGELOG.md").toString("utf8");
current = fs.readFileSync(path.join(basedir, "CHANGELOG.md")).toString("utf8");
} catch (e) {
current = "";
}
Expand All @@ -143,7 +143,7 @@ gitSemverTags(function(err, tags) {
}
var contents = output.join("") + "\n" + current;
if (argv.write)
fs.writeFileSync(basedir + "/CHANGELOG.md", contents, "utf8");
fs.writeFileSync(path.join(basedir, "CHANGELOG.md"), contents, "utf8");
else
process.stdout.write(contents);
});
Expand Down

0 comments on commit ee6ca80

Please sign in to comment.