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.
This commit is contained in:
committed by
Jay Linski
parent
0896d00c2e
commit
30bd78d457
@@ -111,7 +111,6 @@ delete argv._;
|
|||||||
|
|
||||||
const Precompiler = require('../dist/cjs/precompiler');
|
const Precompiler = require('../dist/cjs/precompiler');
|
||||||
Precompiler.loadTemplates(argv, function(err, opts) {
|
Precompiler.loadTemplates(argv, function(err, opts) {
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
Generated
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
"yargs": "^16.2.0"
|
"yargs": "^16.2.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"handlebars": "bin/handlebars"
|
"handlebars": "bin/handlebars.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@definitelytyped/dtslint": "^0.0.100",
|
"@definitelytyped/dtslint": "^0.0.100",
|
||||||
|
|||||||
+1
-1
@@ -79,7 +79,7 @@
|
|||||||
"./runtime": "./dist/cjs/handlebars.runtime.js"
|
"./runtime": "./dist/cjs/handlebars.runtime.js"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"handlebars": "bin/handlebars"
|
"handlebars": "bin/handlebars.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "grunt build",
|
"build": "grunt build",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Precompile handlebar templates.
|
Precompile handlebar templates.
|
||||||
Usage: handlebars [template|directory]...
|
Usage: handlebars.js [template|directory]...
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Outputs this message [boolean]
|
--help Outputs this message [boolean]
|
||||||
|
|||||||
+2
-2
@@ -219,9 +219,9 @@ function executeBinHandlebars(...args) {
|
|||||||
if (os.platform() === 'win32') {
|
if (os.platform() === 'win32') {
|
||||||
// On Windows, the executable handlebars.js file cannot be run directly
|
// On Windows, the executable handlebars.js file cannot be run directly
|
||||||
const nodeJs = process.argv[0];
|
const nodeJs = process.argv[0];
|
||||||
return execFilesSyncUtf8(nodeJs, ['./bin/handlebars'].concat(args));
|
return execFilesSyncUtf8(nodeJs, ['./bin/handlebars.js'].concat(args));
|
||||||
}
|
}
|
||||||
return execFilesSyncUtf8('./bin/handlebars', args);
|
return execFilesSyncUtf8('./bin/handlebars.js', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
function execFilesSyncUtf8(command, args) {
|
function execFilesSyncUtf8(command, args) {
|
||||||
|
|||||||
Reference in New Issue
Block a user