brackets-bower icon indicating copy to clipboard operation
brackets-bower copied to clipboard

enhancement: Install only production packages

Open mrroot5 opened this issue 9 years ago • 4 comments

Is there any option to install only production packages? If not, can you add one please?.

mrroot5 avatar Dec 11 '15 12:12 mrroot5

Just to clarify your meaning:

  • You want an option to install ALL "dependencies", but do NOT install any "devDependencies" in the bower.json file?

Just to further clarify:

  • Are you talking about your project's root bower.json file?
  • Are you talking about the dependencies your project downloads into the /bower_components/ folder?

JKVeganAbroad avatar Feb 03 '16 10:02 JKVeganAbroad

Sorry, I try to clarify with an example (bootstrap):

In my current project into the /bower_components/ folder it install the folders: js, less, nuget, grunt and fonts but in a production environment I only need de "dist" folder. If we have an option to choose between dev and production dependencies we can save a lot of hdd space.

I try to explain it better but english is not my mother language :(.

mrroot5 avatar Feb 08 '16 13:02 mrroot5

Oh, I see what you're saying!

Unfortunately, what you're asking isn't possible. I'll try to explain why:

  • When a developer creates a software package, (for example: Bootstrap)
  • They may choose to release that package with Bower
    • To release with Bower, they must create their own bower.json file
      • bower.json is what instructs Bower (or in our case, bower.json instructs Brackets-Bower) what to do
      • The Bootstrap bower.json file has a section called "ignore", which tells your computer to save HDD space by ignoring certain files (this stops Bower from downloading them in the first place)
        • The Bootstrap developer has 100% control over which files are ignored, and which files are downloaded to your HDD
        • We cannot override this behaviour

So basically, if you only need the /dist/ folder, your only option is to download the whole Bootstrap package, and delete all of the other folders manually.

I hope I've explained this to your understanding . . . I understand the difficulties when you're not using your mother language :+1:

JKVeganAbroad avatar Feb 08 '16 14:02 JKVeganAbroad

Perfect. I thought that bower had a option to download only production package (dist for example) but I see that this option doesn't exists yet :-(.

Thank you very much for your patience and explanations. Close this issue :-).

mrroot5 avatar Feb 10 '16 16:02 mrroot5