Skip to content

Commit 30bd78d

Browse files
committed
Enable IDE code-highlighting for bin-file
By adding the `.js`-extension to the bin-file, IDEs will know that js code-highlighting should be applied to the file, which makes it easier for devs to read the code.
1 parent 0896d00 commit 30bd78d

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

bin/handlebars renamed to bin/handlebars.js

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ delete argv._;
111111

112112
const Precompiler = require('../dist/cjs/precompiler');
113113
Precompiler.loadTemplates(argv, function(err, opts) {
114-
115114
if (err) {
116115
throw err;
117116
}

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"./runtime": "./dist/cjs/handlebars.runtime.js"
8080
},
8181
"bin": {
82-
"handlebars": "bin/handlebars"
82+
"handlebars": "bin/handlebars.js"
8383
},
8484
"scripts": {
8585
"build": "grunt build",

spec/expected/help.menu.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Precompile handlebar templates.
2-
Usage: handlebars [template|directory]...
2+
Usage: handlebars.js [template|directory]...
33

44
Options:
55
--help Outputs this message [boolean]

tasks/test-bin.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ function executeBinHandlebars(...args) {
219219
if (os.platform() === 'win32') {
220220
// On Windows, the executable handlebars.js file cannot be run directly
221221
const nodeJs = process.argv[0];
222-
return execFilesSyncUtf8(nodeJs, ['./bin/handlebars'].concat(args));
222+
return execFilesSyncUtf8(nodeJs, ['./bin/handlebars.js'].concat(args));
223223
}
224-
return execFilesSyncUtf8('./bin/handlebars', args);
224+
return execFilesSyncUtf8('./bin/handlebars.js', args);
225225
}
226226

227227
function execFilesSyncUtf8(command, args) {

0 commit comments

Comments
 (0)