fix(core): update
This commit is contained in:
21
ts/classes.smartdeno.ts
Normal file
21
ts/classes.smartdeno.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { DenoDownloader } from './classes.denodownloader.js';
|
||||
import * as plugins from './plugins.js';
|
||||
import * as paths from './paths.js';
|
||||
|
||||
export class SmartDeno {
|
||||
private denoDownloader = new DenoDownloader();
|
||||
private smartshellInstance = new plugins.smarthshell.Smartshell({
|
||||
executor: 'bash'
|
||||
});
|
||||
|
||||
public async init(optionsArg: {
|
||||
forceLocalDeno?: boolean;
|
||||
} = {}) {
|
||||
const denoAlreadyInPath = await plugins.smarthshell.which('deno', {
|
||||
nothrow: true
|
||||
});
|
||||
if (!denoAlreadyInPath || optionsArg.forceLocalDeno) {
|
||||
await this.denoDownloader.download(plugins.path.join(paths.nogitDir, 'deno.zip'));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user