This commit is contained in:
23
vscode-server-linux-x64-web/node_modules/@vscode/vscode-languagedetection/cli/index.js
generated
vendored
Executable file
23
vscode-server-linux-x64-web/node_modules/@vscode/vscode-languagedetection/cli/index.js
generated
vendored
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const { ModelOperations } = require('../dist/lib/index');
|
||||
const os = require('os');
|
||||
|
||||
(function (params) {
|
||||
console.warn('Note: this CLI is only for diagnosing the model results in @vscode/vscode-languagedetection. It should not be depended on in any production system.');
|
||||
const args = process.argv.slice(2);
|
||||
const content = args.join(os.EOL);
|
||||
|
||||
if (!content) {
|
||||
console.error('No content specified. Please pass in the content as the first argument of invocation.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (content.length <= 20) {
|
||||
console.error('Not enough content specified. Please include more content in your invocation.');
|
||||
return;
|
||||
}
|
||||
|
||||
const modelOperations = new ModelOperations();
|
||||
modelOperations.runModel(content).then((result) => console.log(result));
|
||||
})();
|
Reference in New Issue
Block a user