fx115: Update lots of OS.File/OS.Path uses
This commit is contained in:
parent
5a8a7ebccc
commit
920461cd9d
36 changed files with 233 additions and 300 deletions
|
@ -231,7 +231,7 @@ var Scaffold = new function () {
|
|||
if (await fp.show() != fp.returnOK) {
|
||||
return false;
|
||||
}
|
||||
var path = OS.Path.normalize(fp.file);
|
||||
var path = PathUtils.normalize(fp.file);
|
||||
if (oldPath == path) {
|
||||
return false;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ var Scaffold = new function () {
|
|||
monaco.languages.registerCompletionItemProvider('javascript', this.createCompletionProvider(monaco, editor));
|
||||
|
||||
let tsLib = await Zotero.File.getContentsAsync(
|
||||
OS.Path.join(Scaffold_Translators.getDirectory(), 'index.d.ts'));
|
||||
PathUtils.join(Scaffold_Translators.getDirectory(), 'index.d.ts'));
|
||||
let tsLibPath = 'ts:filename/index.d.ts';
|
||||
monaco.languages.typescript.javascriptDefaults.addExtraLib(tsLib, tsLibPath);
|
||||
// this would allow peeking:
|
||||
|
@ -2233,7 +2233,7 @@ var Scaffold = new function () {
|
|||
}
|
||||
|
||||
function getDefaultESLintPath() {
|
||||
return OS.Path.join(Scaffold_Translators.getDirectory(), 'node_modules', '.bin', 'teslint');
|
||||
return PathUtils.join(Scaffold_Translators.getDirectory(), 'node_modules', '.bin', 'teslint');
|
||||
}
|
||||
|
||||
async function getESLintPath() {
|
||||
|
@ -2243,7 +2243,7 @@ var Scaffold = new function () {
|
|||
|
||||
let eslintPath = getDefaultESLintPath();
|
||||
|
||||
while (!await OS.File.exists(eslintPath)) {
|
||||
while (!await IOUtils.exists(eslintPath)) {
|
||||
let ps = Services.prompt;
|
||||
let buttonFlags = ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING
|
||||
+ ps.BUTTON_POS_1 * ps.BUTTON_TITLE_IS_STRING
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue