You can use the `lodash` custom build for this #1

Closed
jdalton opened this Issue Jan 5, 2013 · 6 comments

Comments

Projects
None yet
2 participants

jdalton commented Jan 5, 2013

Using Lo-Dash's custom build you can create a build with just _.template by performing the following:

lodash include=template
Owner

azproduction commented Jan 5, 2013

result of lodash include=template is to dirty for me: iteratorTemplates, any-javascript-environment exports and so on. Any plans for lodash separation? jQuery style with Closure Compiler-based resources detection.

jdalton commented Jan 5, 2013

You can do lodash include=template exports=node to export for only Node.js, the dead code in the debug build is removed in the minified build by Closure Compiler ;D

You can specify just a minified build via lodash -m include=template exports=node.

Owner

azproduction commented Jan 5, 2013

Thanx @jdalton result of lodash -m include=template exports=node is great! Buuuut ;D obviously source is minified - It is not debugable in node.js environment (without -m It still huge). Even minified lodash.custom.min.js 4004b is 2 times larger than just template.js 1979b. Size is not a advantage in this case, it is like Leica vs Samsung.

The next time when I need detach part of lodash I definitely will use lodash CLI. Thanx for your time.

jdalton commented Jan 5, 2013

Ah, I see you've tailored it specifically for Node :D
I'm curious why size is a concern for you in Node?
(most devs just use Underscore/Lo-Dash without worrying about)

jdalton commented Jan 5, 2013

Also just FYI, since you're only concerned with Node support you can do lodash -m mobile include=template exports=node, the mobile modifier will remove old browser support and compilation.

Owner

azproduction commented Jan 6, 2013

why size is a concern for you in Node?

CLI script, that runs very often. I want to reduce startup latency as much as possible. I'm not a perfectionist, but I want to be sure that this part will not affect anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment