Giter VIP home page Giter VIP logo

confidant's People

Contributors

lambdabaa avatar

Watchers

 avatar

Forkers

rickychien

confidant's Issues

Crash on 0.2.3

./node_modules/.bin/confidant . --exclude test/
/home/gareth/Documents/sf/mobile/node_modules/confidant/build/ninja_stream.js:32
tasks.forEach(function (task) {
^
TypeError: tasks.forEach is not a function
at NinjaStream._transform (/home/gareth/Documents/sf/mobile/node_modules/confidant/build/ninja_stream.js:32:9)
at NinjaStream.Transform._read (_stream_transform.js:167:10)
at NinjaStream.Transform._write (_stream_transform.js:155:12)
at doWrite (_stream_writable.js:292:12)
at writeOrBuffer (_stream_writable.js:278:5)
at NinjaStream.Writable.write (_stream_writable.js:207:11)
at FindStream.ondata (_stream_readable.js:521:20)
at emitOne (events.js:77:13)
at FindStream.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)

v0.4.0 caused some regression

Seeing a lot of

install: invalid option -- 'e'
Try 'install --help' for more information.
ninja: build stopped: subcommand failed.

Confidant needs to provide a way to pass environment variables to every configure.js

@gaye

According to README.md:

Confidant will scan the filesystem rooted at the directory from which it is run for files named configure.js

thus, if we want to launch build system like this

confidant dir DEBUG=1 DEVICE_TYPE=phone

These ENVs such as DEBUG=1, DEVICE_TYPE=phone have to pass into every configure.js, and each configure.js runs on different node -e will mean inside different process. For being able to communicate ENVs within configure.js, these is my solution:

Pass every necessary environment variables while invoking node -e in build.ninja. That could increase length of build.ninja because you may see like this:

rule rule-0
command = cd /Users/Ricky/Documents/confidant/test/fixtures/config_filter && node -e VARIABLE1=xxx VARIABLE2=xxx VARIABLE3=xxx "// source code ..."

Debuggability is still a problem if we want to trace into build.ninja file, but I am going to do this if you feel ok :)

Performance benchmark

confidant is meant to be muy fast. To this end, it would be nice to have a benchmark of a typical web/js and measure the speed of our configuration generation and generated build over time.

Look into inheritance/composition

You can do anything with confidant that you could in pure js and we should provide examples for how users who want to share and/or compose rules can do so. It's possible that looking into this might influence changes in the configuration file format (or lead us to write a little helper or two).

Confidant fails in a sketchy way when there aren't any `config.js` files in the tree

gareth@albee:~/Documents/gaia$ ./node_modules/.bin/confidant 
/home/gareth/Documents/gaia/node_modules/confidant/build/ninja_stream.js:29
  tasks.forEach(function (task) {
        ^
TypeError: undefined is not a function
    at NinjaStream._transform (/home/gareth/Documents/gaia/node_modules/confidant/build/ninja_stream.js:29:9)
    at NinjaStream.Transform._read (_stream_transform.js:179:10)
    at NinjaStream.Transform._write (_stream_transform.js:167:12)
    at doWrite (_stream_writable.js:301:12)
    at writeOrBuffer (_stream_writable.js:288:5)
    at NinjaStream.Writable.write (_stream_writable.js:217:11)
    at Filter.ondata (_stream_readable.js:540:20)
    at Filter.emit (events.js:107:17)
    at readableAddChunk (_stream_readable.js:163:16)
    at Filter.Readable.push (_stream_readable.js:126:10)

Lack of path.isAbsolute in node.js 0.10.36 & 0.12.7

@gaye

It's so weird I found confidant cannot work properly in some node versions ex: 0.10.36 & 0.12.7 and it lacks of path.isAbsolute as well as following errors:

/Users/Ricky/Documents/gaia-playground/node_modules/confidant/build/find_stream.js:31
  if (path.isAbsolute(dir)) {
           ^
TypeError: Object [object Object] has no method 'isAbsolute'
   ...

it get fixed after I switched to 0.12.4 so maybe one of solution is to specify a fixed engine version in package.json:

"engines": {
  "node": "0.12.4",
  "npm": ">=2"
}

However, I hope 0.12.4 can also work with gaia-marionette or other gaia's NPM modules.

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.