0

I am developing a Chrome extension using Angular2-typescript. It is working already, but I am using a bunch of js scripts to make it work that I am not sure if they are too many.

Is there any documentation about it? These are the files I am coping

"copy1": "copy node_modules\\core-js\\client\\shim.min.js lib\\",
"copy2": "copy node_modules\\zone.js\\dist\\zone.min.js lib\\",
"copy3": "copy node_modules\\reflect-metadata\\Reflect.js lib\\",
"copy4": "copy node_modules\\systemjs\\dist\\system.src.js lib\\",
"copy5": "copy node_modules\\@angular\\core\\bundles\\core.umd.js lib\\",
"copy6": "copy node_modules\\@angular\\common\\bundles\\common.umd.js lib\\",
"copy7": "copy node_modules\\@angular\\compiler\\bundles\\compiler.umd.js lib\\",
"copy8": "copy node_modules\\@angular\\platform-browser\\bundles\\platform-browser.umd.js lib\\",
"copy9": "copy node_modules\\@angular\\platform-browser-dynamic\\bundles\\platform-browser-dynamic.umd.js lib\\",
"copy10": "copy node_modules\\@angular\\http\\bundles\\http.umd.js lib\\",
"copy11": "copy node_modules\\@angular\\router\\bundles\\router.umd.js lib\\",
"copy12": "copy node_modules\\@angular\\forms\\bundles\\forms.umd.js lib\\",
"copy13": "copy node_modules\\angular-in-memory-web-api\\bundles\\in-memory-web-api.umd.js lib\\",
"copy14": "robocopy node_modules\\rxjs lib\\rxjs *.js /E",

*article from which I end up with this list https://www.sitepoint.com/chrome-extension-angular-2/

GWorking
  • 4,011
  • 10
  • 49
  • 90
  • What do you mean by "too many"? Why do you think you might have too many? What portion of the process of going from writing code to a functional extension released to the public do you think are going to be imposing a limit? I'm not really seeing what your concerns are, or where they are coming from. – Makyen Mar 03 '17 at 09:06
  • I guess I mean by comparing to writing a Chrome extension without Angular2 (plain js). I am only making sure I'm not packing a bunch of files that are not needed – GWorking Mar 03 '17 at 09:17
  • Well, for us to determine, generically, if you are including files which you don't need to is, at best, difficult. Usually things are included because you are using them. We don't know everything your extension is doing, so there is no way for us to be able to definitively say that you don't need a particular library, except, perhaps, in some specific cases. – Makyen Mar 03 '17 at 09:28
  • 1
    As to "too many": The extension I looked at for [this answer](http://stackoverflow.com/a/39060218/3773011) injects 78 different script files into every single `https` page. – Makyen Mar 03 '17 at 09:33
  • It is a very simple extension for managing bookmarls. The question could be formulated like this: "for a very basic extension, does this list correspond to the minimum libraries that need to be loaded when using Angular2?"? What I'm trying to know is whether for Angular2, there are a list of files that need to be packed regardless of the complexity of your extension, and whether the list I've pasted could correspond to it – GWorking Mar 03 '17 at 09:47

0 Answers0