Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what does autoscan do? #1

Open
andreineculau opened this issue Aug 25, 2017 · 6 comments
Open

what does autoscan do? #1

andreineculau opened this issue Aug 25, 2017 · 6 comments

Comments

@andreineculau
Copy link

andreineculau commented Aug 25, 2017

read https://github.com/nickkolok/paraquire/blob/d438aed4d5e23dd7612870c906fb4e7ff2575c28/etc/autoscan-proposal.md and i'm in the dark completely

is autoscan:true supposed to mean look in package.json paraquire.json ? and autoscan:false doesn't ? I see no point - use that as default, and maybe allow for configs to be altered in the pararequire paraquire.json call.

Secondly, I want to highlight that in my original tweet I said a module pararequire.js paraquire.js (not a json file) https://twitter.com/andreineculau/status/900808960667766784 which makes "For example, I don't know how to put in JSON the following:" redundant. babel, eslint, etc have all introduced js-based configuration because it keeps the world open (you can run code, you can require configs from other files, etc)

@nickkolok
Copy link
Owner

I.e. you mean that paraquire should use another entry point? I.e. require looks to index.js, paraquire looks to paraindex.js, where should be smth honest like this:

module.exports =
paraquire('./index.js',{builtin:{fs:true}});

?

In this case the dependent should use usual require:

var lib = require('lib/paraindex.js');

@andreineculau
Copy link
Author

I somehow get the feeling we're not understanding each other.

  1. What should autoscan do?
  2. if autoscan is supposed to be a flag to tell paraquire to look up permissions in some well-known configuration file, then I would do without the flag and always do the lookup

@nickkolok
Copy link
Owner

Yes, unfortunately certain misunderstanding takes place =/
So, let's step thesis by thesis.

Your Thesis 1: library should describe permissions needed for it in special easy-readed file.
Your Thesis 2: this file shoul be .js, not .json
Your Thesis 3: paraquire shoul automatically scan package directory for such a file

Am I right?

@andreineculau
Copy link
Author

andreineculau commented Aug 25, 2017 via email

@nickkolok
Copy link
Owner

So,
My Thesis 4: this work culd be done by entry point, alternative to index.js. Let's call it paranodex.js.
My Thesis 5: paranodex.js can contain all necessary paraquire calls. List of paraquire calls is fair enough to determine rights used by library.

Do you agree with these?

@andreineculau
Copy link
Author

andreineculau commented Aug 26, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants