Revert "Try to fix external js issue"

This reverts commit 8a5170a92c.
This commit is contained in:
Willem Dantuma 2019-07-17 16:55:17 +02:00
parent be97341cc0
commit 670cb6ceb5
4 changed files with 8 additions and 6 deletions

View File

@ -12,7 +12,9 @@ pipeline {
}
stage('build'){
steps {
sh '''ng build common'''
sh '''ng build common
cp projects/common/src/assets/resumable.js dist/common/fesm2015
cp projects/common/src/assets/resumable.js dist/common/fesm5'''
}
}
stage('npm publish'){

View File

@ -4,7 +4,7 @@ import { Subject , of } from 'rxjs';
import { HttpClient, HttpParams } from "@angular/common/http";
declare var Resumable; // avoid missing property error on require
declare var require; // avoid missing property error on require
@Injectable()
export class ResumableFileUploadService {
@ -26,8 +26,8 @@ export class ResumableFileUploadService {
init = function () {
this.ref
// require.ensure([], require => {
//let Resumable = require('./resumable.js');
require.ensure([], require => {
let Resumable = require('./resumable.js');
var other = this;
this.resumable = new Resumable(
{
@ -105,7 +105,7 @@ export class ResumableFileUploadService {
if (this.dropElement) this.resumable.assignDrop(this.dropElement);
if (this.fileBrowseElement) this.resumable.assignBrowse(this.fileBrowseElement);
if (this.directoryBrowseElement) this.resumable.assignBrowse(this.directoryBrowseElement, true);
});
}
addFiles = (files: any[], event: any, geoRefJson?: string, attributes?: any) => {

View File

@ -11,7 +11,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": ["node_modules/resumable/resumable.js"],
"types": [],
"lib": [
"dom",
"es2018"