I have almost 1000 lines of code and its difficult to maintain and trouble shoot the code. I have seen that few people are developed module based code.
So is it possible to create modules (few .js files) and integrate all those modules in single file (say index.html) so that its easy to deploy and easy to use.
If you want a single file building using the ArcGIS JS API, as of right now Scott's blog that you linked to is pretty much the only way to go. At least I haven't seen anyone else put another solution forward and I know myself and others have hacked away at options for a while. He did all the nitty gritty of building the exlusion list to get a single file Dojo build working. It's not pretty, but it does the job.
If you want a single file building using the ArcGIS JS API, as of right now Scott's blog that you linked to is pretty much the only way to go. At least I haven't seen anyone else put another solution forward and I know myself and others have hacked away at options for a while. He did all the nitty gritty of building the exlusion list to get a single file Dojo build working. It's not pretty, but it does the job.