Skip to content

Commit

Permalink
Use Lodash's _.template instead of lodash.template package
Browse files Browse the repository at this point in the history
  • Loading branch information
gorner committed Apr 22, 2024
1 parent 659636a commit 7aec9dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/tasks/git-init.js
Expand Up @@ -47,7 +47,7 @@ module.exports = class GitInitTask extends Task {
}

async _gitCommit() {
const template = require('lodash.template');
const template = require('lodash/template');
let commitTemplate = fs.readFileSync(path.join(__dirname, '../utilities/COMMIT_MESSAGE.txt'));
let commitMessage = template(commitTemplate)(pkg);
let env = this.buildGitEnvironment();
Expand Down
2 changes: 1 addition & 1 deletion lib/utilities/process-template.js
Expand Up @@ -6,5 +6,5 @@ module.exports = function processTemplate(content, context) {
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g,
};
return require('lodash.template')(content, options)(context);
return require('lodash/template')(content, options)(context);
};
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -91,7 +91,7 @@
"is-git-url": "^1.0.0",
"is-language-code": "^3.1.0",
"isbinaryfile": "^5.0.0",
"lodash.template": "^4.5.0",
"lodash": "^4.17.21",
"markdown-it": "^13.0.1",
"markdown-it-terminal": "^0.4.0",
"minimatch": "^7.4.3",
Expand Down

0 comments on commit 7aec9dc

Please sign in to comment.