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

automatically resolve dependencies from the source code and enable users to load only the required modules for their needs #52

Closed
v0lkan opened this issue Jan 30, 2012 · 3 comments
Assignees
Milestone

Comments

@v0lkan
Copy link
Member

v0lkan commented Jan 30, 2012

{
timer : {
'core'
'stringhelper.core'
'unit'
},

unit : {
    'core',
    'ajax'
},

lorem : {
    'core'
    'ipsum'
}

}

  1. load everything selected and its sub items into an array

(assuming we only seleted timer node)
timer
core
stringhelper.core
unit
ajax

  1. sort the array

Here is a very naive sorting approach (similar to bubble sort), but since we do not have thousands of items, it will be sufficient.

if the current item has a dependency, move the dependency before the item

core            core            core
timer           stringhelper.core   stringhelper.core
stringhelper.core   timer           timer
unit            unit            ajax
ajax            ajax            unit
  1. when the final order is achieved concat all the files into a temp file,
    minimize and save it under a common name (like o2.timer.min.js)
  2. stream the saved file.
@ghost ghost assigned v0lkan Jan 30, 2012
@v0lkan
Copy link
Member Author

v0lkan commented Mar 26, 2012

that's related to the dependdency-resolver issue.

@v0lkan
Copy link
Member Author

v0lkan commented May 27, 2012

this is dupe but has some extra explanation. so not closing it.

@v0lkan
Copy link
Member Author

v0lkan commented Jan 9, 2014

architecture changed; irrelevant.

@v0lkan v0lkan closed this as completed Jan 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant