mirror of https://github.com/embarklabs/embark.git
move the versions manager to its own module
This commit is contained in:
parent
8a5ccac1ee
commit
2baaba07e6
|
@ -296,11 +296,7 @@ class Engine {
|
||||||
}
|
}
|
||||||
|
|
||||||
libraryManagerService(_options) {
|
libraryManagerService(_options) {
|
||||||
const LibraryManager = require('../versions/library_manager.js');
|
this.registerModule('library_manager');
|
||||||
this.libraryManager = new LibraryManager({
|
|
||||||
plugins: this.plugins,
|
|
||||||
config: this.config
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,11 @@ var Npm = require('./npm.js');
|
||||||
|
|
||||||
class LibraryManager {
|
class LibraryManager {
|
||||||
|
|
||||||
constructor(options) {
|
constructor(embark) {
|
||||||
this.plugins = options.plugins;
|
this.config = embark.config;
|
||||||
this.config = options.config;
|
|
||||||
this.contractsConfig = this.config.contractsConfig;
|
this.contractsConfig = this.config.contractsConfig;
|
||||||
this.storageConfig = this.config.storageConfig;
|
this.storageConfig = this.config.storageConfig;
|
||||||
|
|
||||||
this.embark = this.plugins.createPlugin('libraryManager', {});
|
|
||||||
|
|
||||||
this.determineVersions();
|
this.determineVersions();
|
||||||
|
|
||||||
this.registerCommands();
|
this.registerCommands();
|
|
@ -1,11 +1,9 @@
|
||||||
const {PerformanceObserver, performance} = require('perf_hooks');
|
const {PerformanceObserver, performance} = require('perf_hooks');
|
||||||
require('colors');
|
require('colors');
|
||||||
const utils = require('../utils/utils.js');
|
const utils = require('../utils/utils.js');
|
||||||
// TODO: remove this
|
const i18n = require('../../core/i18n/i18n.js');
|
||||||
const i18n = require('../core/i18n/i18n.js');
|
|
||||||
i18n.setOrDetectLocale('en');
|
i18n.setOrDetectLocale('en');
|
||||||
|
|
||||||
|
|
||||||
class NpmTimer{
|
class NpmTimer{
|
||||||
constructor(options){
|
constructor(options){
|
||||||
this._logger = (options.logger && typeof options.logger.info == 'function') ? options.logger : console;
|
this._logger = (options.logger && typeof options.logger.info == 'function') ? options.logger : console;
|
Loading…
Reference in New Issue