GithubHelp home page GithubHelp logo

bower-nexus-resolver's People

Contributors

atiyou avatar jbouyoud avatar ptitgraig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bower-nexus-resolver's Issues

Error when passing config when downloading

Hello, sorry for this very fast comment, but my colleague had a problem while trying to pass strictSsl = false config parameter to the resolver.

His goal is to pass strictSsl=false for the moment, and in a near future, to pass a specific ca.

While tracking why this was not working, I discovered an error in the code.

In index.js, in the download call, the 3rd parameter is this.config, which is always null. It should be bower.config or maybe leave it to this.config but in that case one should add config: bower.config in the returned object.

Hope this is clear, I asked him to send a pull request to correct this bug.

regards

express does not comm with json anymore - plus remove redondant '//'

below is a minor fix for express and json in the "server.js" implementing the intermediate registry as proposed. It also includes a second fix to keep prefix as 'nexus://' versus 'nexus:////'. In the example I used the port 8082.

So the .bowerrc should be :

{
  "directory": "bower_components",
  "registry": "http://localhost:8082/nexus-bower/",
  "nexusRegistry": "http://localhost:8081/nexus/content/repositories/npm-bower/",
  "resolvers": [
    "bower-nexus-resolver"
  ]
}

The .bowerrc file could be located in your project folder, next to the bower.json file.

var express = require('express'),
    json = require('express-json'),
    http = require('http'),

    config = {
      port: 8082,
      context: 'nexus-bower',
      prefix: 'nexus://'
    },

    app = express(),
    server = http.createServer(app).listen( process.env.PORT || config.port);

app.use( json() );

// wait for a request as: 
// http://<hostname>/<context>/packages/<package-name> 
// respond a simple JSON 
app.get('/' + config.context + '/packages/:name', function(req, res){
    res.json({
        "name": req.params.name,
        "url": config.prefix + req.params.name + '/' +req.params.name
    });
});

console.log("STARTUP:: Express Bower registry simulator server listening on port::", server.address().port, ", environment:: ", app.settings.env);

Finally, you may want to create on your nexus a npm-bower local repository dedicated to bower packages and npm publish downloaded bower packages. Does any one know a tool that jsut does that ?

troubleshooting

  • to see info about bower use -j and -V options: javascript bower -j -V install angular
  • to see info about your express server launch it: javascript set DEBUG=express:* & grunt server
  • clear bower cache

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.