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

unexpected result when using -bps to compile a small snippet #233

Closed
larroy opened this issue Sep 3, 2013 · 4 comments
Closed

unexpected result when using -bps to compile a small snippet #233

larroy opened this issue Sep 3, 2013 · 4 comments
Labels

Comments

@larroy
Copy link

larroy commented Sep 3, 2013

cat|coco -bps
I = (x) -> x
[Function]

Output should be:
(function(){
var I;
I = function(x){
return x;
};
}).call(this);
~

@vendethiel
Copy link
Contributor

-bps means --bare --print --stdin. So it doesn't compile and won't add the iife wrapper (--bare).
If you want to compile, use -bpcs

@satyr
Copy link
Owner

satyr commented Sep 3, 2013

coco's --print works more like node's and (unlike coffee) doesn't imply --compile.

$ coco -pe 0
0

$ node -pe 0
0

$ coffee -pe 0
(function() {
  0;


}).call(this);

@satyr satyr closed this as completed Sep 3, 2013
@larroy
Copy link
Author

larroy commented Sep 4, 2013

Thanks. I was just trying to migrate to coco from coffee and didn't found a clear syntax reference. These discrepancies led me to think that it wasn't working properly. I think if there could be more documentation adoption could be improved. Is there a way to help for the novice in this respect?

Pedro.

@satyr
Copy link
Owner

satyr commented Sep 4, 2013

Feel free to tweak the wiki and/or pull-req for #232 if you dare.

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

No branches or pull requests

3 participants