@@ -73,7 +73,7 @@ function getContent(url, callback) {
7373 if ( xhr . status >= 200 && xhr . status < 300 ) {
7474 callback ( xhr . responseText ) ;
7575 } else {
76- console . log ( `Failed to load ${ url } !` ) ; // DEBUG
76+ throw new VueifyJSError ( `Failed to load ${ url } !` ) ;
7777 }
7878 } ;
7979 xhr . open ( 'GET' , url , true ) ;
@@ -251,7 +251,7 @@ function findSFC(callback) {
251251 * @return sfc_src
252252 */
253253function downloadSFC ( sfc_url ) {
254- console . log ( `download: ${ sfc_url } ` ) ; // DEBUG
254+ // console.log(`download: ${sfc_url}`); // DEBUG
255255 return new Promise ( resolve => {
256256 getContent ( sfc_url , ( sfc_src ) => {
257257 resolve ( sfc_src ) ;
@@ -305,7 +305,7 @@ async function preprocessCSS(sfc_obj) {
305305 // generate scopeId
306306 if ( ! _scopeId ) {
307307 _scopeId = genScopeId ( ) ;
308- console . log ( "scopeId:" , _scopeId ) ; // DEBUG
308+ // console.log("scopeId:", _scopeId); // DEBUG
309309 }
310310
311311 // create temporary iframe to hold & parse css text
@@ -378,7 +378,7 @@ var cachedSFCs = {}; // { url : {blob_url, sfc_obj} }
378378 * @return input JS object
379379 */
380380async function preprocessJS ( sfc_obj , deps = [ ] ) {
381- console . log ( 'dependency stack' , deps ) ; // DEBUG
381+ // console.log('dependency stack', deps); // DEBUG
382382 var js = sfc_obj . js ;
383383
384384 // get content only from last script tag
@@ -400,7 +400,7 @@ async function preprocessJS(sfc_obj, deps=[]) {
400400 _jsText = await asyncStringReplace ( _jsText , re , async ( match , path , offset , txt ) => {
401401
402402 let child_sfc_url = resolveUrl ( path ) ;
403- console . log ( `found child: ${ child_sfc_url } ` ) ; // DEBUG
403+ // console.log(`found child: ${child_sfc_url}`); // DEBUG
404404
405405 // check cyclic dependency
406406 if ( deps . indexOf ( child_sfc_url ) != - 1 ) {
@@ -416,7 +416,7 @@ async function preprocessJS(sfc_obj, deps=[]) {
416416 // replace import statement from relative path to blob url
417417 let cache = await Promise . resolve ( cachedSFCs [ child_sfc_url ] ) ;
418418 new_str = match . replace ( path , cache . blob_url ) ;
419- console . log ( `${ match } ====> ${ new_str } ` ) ; // DEBUG
419+ // console.log(`${match} ====> ${new_str}`); // DEBUG
420420 return new_str ;
421421 } ) ;
422422
@@ -461,7 +461,7 @@ async function uploadSFC(sfc_code) {
461461 * @return {string, object }
462462 */
463463async function transpileSFC ( sfc_src , deps = [ ] ) {
464- console . log ( 'transpile:' , deps [ deps . length - 1 ] ) ; // DEBUG
464+ // console.log('transpile:', deps[deps.length-1]); // DEBUG
465465 let sfc_obj = await parseSFC ( sfc_src ) ;
466466 await preprocessCSS ( sfc_obj ) ;
467467 await preprocessHTML ( sfc_obj ) ;
@@ -578,14 +578,14 @@ async function registerRootSFCs(VueClass) {
578578
579579 return async function ( ) {
580580 sfc_url = resolveUrl ( sfc_url ) ;
581- console . log ( `found: ${ sfc_url } ` ) ; // DEBUG
581+ // console.log(`found: ${sfc_url}`); // DEBUG
582582
583583 await importSFC ( sfc_url , [ sfc_url ] ) ;
584584 let sfc_obj = await Promise . resolve ( cachedSFCs [ sfc_url ] ) ;
585585
586586 // register as global components
587587 if ( ! rootSFCs . includes ( sfc_obj ) ) {
588- console . log ( `register: ${ sfc_url } ` ) ; // DEBUG
588+ // console.log(`register: ${sfc_url}`); // DEBUG
589589 rootSFCs . push ( sfc_obj ) ;
590590 new_sfcs . push ( sfc_obj ) ;
591591 sfc_obj . name = sfc_name ;
0 commit comments