File tree Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Original file line number Diff line number Diff line change @@ -14,34 +14,17 @@ qx.Class.define("qxl.packagebrowser.compile.LibraryApi", {
14
14
15
15
members : {
16
16
__pkgDataGenerated : false ,
17
- require : function ( module ) {
18
- try {
19
- require . resolve ( module ) ;
20
- } catch ( e ) {
21
- if ( e . code === 'MODULE_NOT_FOUND' ) {
22
- this . loadNpmModule ( module ) ;
23
- }
24
- }
25
- return require ( module ) ;
26
- } ,
27
-
28
- loadNpmModule : function ( module ) {
29
- const { execSync} = require ( "child_process" ) ;
30
- let s = `npm install --no-save --no-package-lock ${ module } ` ;
31
- qx . tool . compiler . Console . info ( s ) ;
32
- execSync ( s , {
33
- stdio : "inherit"
34
- } ) ;
35
- } ,
36
17
37
18
async load ( ) {
38
19
let command = this . getCompilerApi ( ) . getCommand ( ) ;
39
- command . addListener ( "made" , this . __onMade , this ) ;
20
+ if ( command instanceof qx . tool . cli . commands . Compile ) {
21
+ command . addListener ( "made" , this . __onMade , this ) ;
22
+ }
40
23
} ,
41
24
42
25
/**
43
26
* Generate the data needed by the packagebrowser application.
44
- * Triggered by the compiler's "writtenApplication " event.
27
+ * Triggered by the compiler's "made " event.
45
28
* @param {qx.event.type.Event } e
46
29
* @return {Promise<void> }
47
30
* @private
You can’t perform that action at this time.
0 commit comments