Closed daira closed 11 years ago
Anything in build
only gets updated when a release is made. During the normal development cycle you would see changes going into vendor
.
The commit history of build
is indicative, https://github.com/arlolra/otr/commits/master/build
As is vendor
, https://github.com/arlolra/otr/commits/master/vendor
Added to the readme https://github.com/arlolra/otr/commit/01b550b237f971ceb0f08f743a7e48371edb9072.
Hope that clarifies. Feel free to reopen.
Almost forgot, the vendor/cryptojs
directory contains the individual files from the CryptoJS library. I use a build step to concatenate those files together and wrap them up for packaging. The result is vendor/crypto.js
. You can reproduce it with, make build TASK=concat:cryptojs
.
Okay. Is it correct that various files do require('../vendor/$FOO.js')
, in that case?
Yeah, I think it's ok.
The library supports two module patterns in the browser: AMD, and just exposing a global variable. The lines you're referring to correspond to CommonJS, which is only used in node.js
When a release is made for node, npm publish
tars up a specific commit tied to a version number, at which point vendor/
and build/
will be identical, as noted above.
The build/
dir is for people coming to github in between releases to get a frozen copy for use in the browser.
I suppose if someone wanted CommonJS support in the browser those strings could be substituted to point to dep/
.
Wrote this up for you, https://github.com/arlolra/otr/commit/8d365b1de756159b8c4feb3e316307d2f13bee03
Thanks!
A diff seems to show them as identical apart from the presence of the
vendor/cryptojs
directory.