Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Multiplely included files, functions in dist/env.js

#141

Hola,

Right now in the final env.X.js file.... urlparse.js is include twice. entend.js is include 5? times. I think Aspect.js will want to be included in multiple places too.

Do we want a envjs-common.js file to be used and reused, so items are included once?

Thoughts welcome!

--nickg

Reported by nickg · March 28th, 2010 @ 12:53 PM

State: new
Milestone: none
Assigned to: Thatcher Thatcher

Activity

  1. Thatcher
    Thatcher

    Theres really not a good reason to include a file more than 10 line twice.
    In fact all of the file included mutliple times might as well become methods
    of envjs. extend was a bad example to try to reuse.

    Does that seem reasonable to you too?

    March 29th, 2010 @ 03:22 PM

  2. nickg
    nickg

    agreed: all those small functions should be a method of Envjs. Most of those are utilities anyways. And trim actually might want to be overridden (rhino oddly doesn't have string.trim, while spidermonkey, others have it natively).

    What about bigger files like urlparse.js and aspect.js?

    --nickg

    March 29th, 2010 @ 03:26 PM

  3. Thatcher
    Thatcher

    Also Envjs.functions i guess. we could go back to making Envjs it's own
    closure so some bigger routine can be encapuslated. It's sort of 6 one way,
    1/2 dozen the other. I'm almost dug out of my open source back logs, the
    way-over-due stuff anyway, but I'm not a control freak so I'll let you and
    the team decide whats best. The good thing about putting it inside the
    Envjs closure is that we can abstract the implementation, but my opinion is
    once its pure js-ish it might as well be directly on Envjs since that's
    basically our goal.

    March 29th, 2010 @ 04:14 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.