estatico icon indicating copy to clipboard operation
estatico copied to clipboard

fixed and improved JS scaffolding

Open swey opened this issue 9 years ago • 1 comments

Fixes the initialization of the JS for modules

Refactoring:

  • the name, events and default options are defined as constants or at least static (again), in the latest version the variables were recreated for every instance/every call of ClassName.events
  • the import statement was moved to the top of the file (more common)
  • The class comment is not longer preserved
  • the extra line for "export default" was removed and replaced with "export default class"
  • ES6 string substitution used
  • some JSdoc was added (accessors)
  • the destroy method was moved up

swey avatar Jan 17 '17 09:01 swey

@christiansany, can you have a look at this when working on https://github.com/unic/estatico-nou/issues/3?

backflip avatar Feb 11 '18 12:02 backflip