evshiron / nwjs-builder

https://www.npmjs.com/package/nwjs-builder
76 stars 12 forks source link

Refactor? #10

Closed evshiron closed 8 years ago

evshiron commented 8 years ago

At first, I want to do some cleaning in the build binary procedures. Currently the procedure is just too long and sharing too many variables, along with the limited destructuring support from node.js 4.x/5.x (destructuring can't be used without a let/const/var keyword, and same variable name can't be let twice), it brings some pain to me. Anyway, supporting for node.js 4.x/5.x is a must. I have been thinking about workarounds to overcome this issue. In the next refactor, I will bind an object to the generator, which is used to store constants, and every variable in the generator will be declared with var. This should help developers distinguish the purpose of the many variables.