Wednesday, 12 April 2017

Install bower packages from file system (without local registry)

Our company's network is behind a Proprietary-Corporate-Proxy™ which doesn't work with the bower client, however we also have machines which can directly contact to the internet. For node modules, we use npmbox to create local packages that we can copy over to the development machines and now we're looking for a similar solution for bower.

The bower API states that bower packages can be both installed from zip resources as well as local folders, but nothing seems to work.

Project structure

projectXZ\
    .bower\
        jquery\
            ... // unpackaged bower files
        jquery-test.zip
    .npmbox\
        ... // npmbox files
    src\
        node_modules\
            ...
        .bowerrc
        package.json
        bower.json

Attempts (?)

I tried the following things:

C:\dev\projectXZ\src\>
    bower install ..\.bower\ 
    bower install ..\.bower\jquery\
    bower install ..\.bower\jquery\somefile.txt
    bower install ..\.bower\jquery-test.zip

C:\dev\projectXZ\> // using .bowerrc for paths
    bower install .\.bower\
    ... 

However no matter what I do, bower always attempts to connect to the internet! Several suggestions in e.g. bower/issues/1275 simply don't work at all. Specifying flags like --offline or changing paths to absolute or *nix style (/ instead of \) doesn't help either.



via artganify

No comments:

Post a Comment