When "steal.paths" are in index.html file application build is failing
- able to access directly from browser using http://localhost/steal/test/complexpackaging/com.my.common/resources/index.html
- build command "./js /Users/aballa/my/projects/steal/test/complexpackaging/com.my.common/scripts/build.js" fails with below error
- OUTPUT
- aballa-macbook-pro:projects aballa$ ./js /Users/aballa/my/projects/steal/test/complexpackaging/com.my.common/scripts/build.js
- Building to steal/test/complexpackaging/common/
- opening steal/test/complexpackaging/com.my.common/resources/index.html
- adding dependencies
- + stealconfig.js
- + common/my/init.js
- stealing common/my/common.js
- + common/my/common.js
- + common/my/common-1.js
- + common/my/common-2.js
- + common/my/common-1.css
- + common/my/common-2.css
- !!!!!!!!!!! ERROR !!!!!!!!!!!
- -message = Cannot read property "files" from undefined
- -fileName =
- -name = TypeError
- -lineNumber = 0
When "steal.paths" are in stealconfig.js file package css doesn't have merged css
- see /steal/test/complexpackaging/com.my.common/resources/stealconfig.js
- able to access directly from browser using http://localhost/steal/test/complexpackaging/com.my.common/resources/index.html
/steal/test/complexpackaging/common/packages/common.css doesn't have merged css
- build command "./js /Users/aballa/my/projects/steal/test/complexpackaging/com.my.common/scripts/build.js" is successful
- OUTPUT
- aballa-macbook-pro:projects aballa$ ./js /Users/aballa/my/projects/steal/test/complexpackaging/com.my.common/scripts/build.js
- Building to steal/test/complexpackaging/common/
- opening steal/test/complexpackaging/com.my.common/resources/index.html
- adding dependencies
- + stealconfig.js
- + common/my/init.js
- stealing common/my/common.js
- + common/my/common.js
- + common/my/common-1.js
- + common/my/common-2.js
- + common/my/common-1.css
- + common/my/common-2.css
- Building packages
- Package: steal/test/complexpackaging/common//packages/common js/css
- + common/my/common-1.js
- + common/my/common-2.js
- + common/my/common-1.css
- + common/my/common-2.css
- + common/my/common.js
- Building steal/test/complexpackaging/common/production.js
Requirement
- Each module should have its own package (e.g. com.my.common will have common.js package)
- Module (e.g. com.my.app1) which is dependent on other common modules (e.g. com.my.common) will steal the package (common.js package) instead of including common.js in its production.js. By doing so we can deliver common modules independently without having to build and deliver all module which are dependent on common modules when ever common modules change.