Skip to content

KataWorks/web-modularization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

web-modularization

  • Figure out the sequence
    • a index.html with a lot of <script> tags, figure out the right sequence to load all the scripts correctly.
  • Implement define
    • make all the scripts wrapped with define function and import dependencies by require as the parameter of define.
    • implement define to load all the scripts correctly.
  • Asynchronize require
    • remove all the <script> tags and left only one for require.js to setup the main entry app.js.
    • implement define in require.js to import dependencies by adding <script> tag asynchronously.
  • Get together
    • implement a Node.js program webpack.js to glue all the scripts together as one script file.
  • Rip the wrapper
    • remove all the invoking of define function but left callback body, and replace return statement with re-assigning value for module.exports.
    • implement webpack.js to load all the wrapper-ripped scripts correctly.
  • Configurable

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published