Code Monkey home page Code Monkey logo

package's People

Contributors

dominicbarnes avatar matthewmueller avatar stephenmathieson avatar yields avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

guotie mvirole

package's Issues

How we plan to use this project.

Hey! I think it is really great how you have broken duo up. I have just finished describing a project that will make heavy use of duo-package. If all goes well it should offer an opportunity to help build up this project up over time.

https://github.com/codingcoop/pollinate

The idea may seem a little abstract... Our focus is to revolve it around virtualization and automation, but it is distilled to be used creatively. If you were curious, feedback is very welcome :)

fix inflight and check for package existence in destination

right now, inflight isn't up-to-date. This causes issues when you make local modifications and then re-run the same instance (like for duo-watch)

also, checking if the package already exists in the directory was removed, maybe by accident, maybe to fix something, i don't remember.

travis

got this in travis ci:

screen shot 2014-06-10 at 4 58 42 pm

we need better errors too, like show on which repo it failed etc..
:/

github tokens displayed in DEBUG output

i feel like we've tried to avoid this in the past so people are able to share their logs without giving away potentially sensitive information...

$ DEBUG=* make
[ ... ]
  duo-package [email protected]: fetching from https://{TOKEN}@github.com/visionmedia/debug/archive/2.1.3.tar.gz +1ms
  duo-package curl -v -L -H "User-Agent: duo-package" https://{TOKEN}@github.com/visionmedia/debug/archive/2.1.3.tar.gz +2ms
[ ... ]

move github stuff to duo-github

per duojs/duo#116.

this will allow us to abstract all of the api stuff (arguably the most complex part of the codebase), letting this module just handle the important stuff like untarring, caching, installing, etc. it'll also allow us to easily add support for other providers (bitbucket, gitorious, etc.).

public api needs to be decided, but something based on duojs/duo#116 (comment) has my vote:

var pkg = new Package('somebody/something', '0.13.x')
pkg.provider(require('duo-github'))
pkg.token('abcdefg')
pkg.directory('components')
pkg.fetch(function(err){ ... })

var pkg = new Package('someone-else/somerepo', '~0.1')
pkg.provider(require('duo-bitbucket'))
...

var pkg = new Package('someguy/somepackage', '~0.1')
pkg.provider(require('duo-gitorious'))
...

in order to not break back-compat, we could simply add something like:

if (!this.provider()) this.provider(require('duo-github'));

to Package#fetch.

SyntaxError: Unexpected token *

Looks like there may be a type at line 101?

/Users/evelo/Documents/Repos/pollinate/node_modules/duo-package/lib/index.js:101
Package.cleanCache = function *() {
                              ^
SyntaxError: Unexpected token *
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/evelo/Documents/Repos/pollinate/lib/fetch.js:10:15)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

use /tmp/duo instead of ~/.duo for cache

I think the cache should be a in a place that naturally has an "expiration". I think require('os').tmpdir() is a good place for this. I'd also like to keep $HOME clean

Also, duo shouldn't complain if it can't find the cache. Running into this error:

$ duo entry.js

  Error: ENOENT, open '/Users/matt/.duo/[email protected]'

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.