keybase / triplesec

Triple Security for the browser and Node.js

Home Page:https://keybase.io/triplesec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you make the exported JavaScript file be unminified and contain comments?

rilchr opened this issue · comments

I want to use your library in an open source project. I can't however do that if the only version of your code in JavaScript you provide is minified. There's no way to audit or review that code in minified form so it could theoretically contain backdoors or bugs after minification. In other words I can't trust or use a minified JavaScript file in my project because it's similar to placing trust in a compiled binary file that I didn't compile.

Can you provide an uncompressed, unminified and fully commented version of the JavaScript file when you release? I understand this may be a little tricky seeing it's written in CoffeeScript? or some other language but there must be a method to retain a readable formatting of the code with comments.

Thanks!

commented

Can't you just compile the library from the CLI before consuming it? I don't like reading Coffeescript either, but imo asking for a complete rewrite seems a bit too much.

@yoshuawuyts Sorry I should be clearer, I'm not asking for a complete rewrite into JavaScript. I just want the output from the CoffeeScript build process to JavaScript make the resulting JavaScript not minified and still retain the majority of code comments. Is that possible?

commented

Can't you just make build?

@yoshuawuyts I'm sure I could. How do I build the project? I just need node.js and run make build from the cloned repo and that will output a readable JS file?

If that's true, then can you put up the readable JS file by default on the webpage, not the minified one. Or supply both like jQuery do. That will save a lot of people from building themselves.

commented

Yep, that's the way you do it. Though be wary that make isn't available by default on Windows machines, you'll need to install a suitable binary.

  • Install node
  • Fetch module dependencies with npm install
  • make build