Skip to content

Conversation

@ffflabs
Copy link

@ffflabs ffflabs commented Jul 26, 2017

Along with node, AMD and CommonJS output format, this PR enables the task to output compiled templates into an ES2015 module.

Since this property is undefined in ES2015, the task now accepts a root option that will be used to replace this. If not set, and desired format is es2015, root will default to templates.

Both node and es2015 output formats need a namespace property. If these format are chosen, and the namespace option is falsy, said property will default to JST

Changes:

  • Updates README.md with instructions to use es2015 output format.
  • It accepts a root property (since 'this' is undefined in ES2015 modules)
  • It forces a non-falsy namespace option when using node or es2015 formats
  • It prepends a var declaration for the root property when it is declared
  • Simplifies amd define block parsing when the property is an array

@ffflabs ffflabs force-pushed the output_to_es2015 branch 2 times, most recently from 934fff8 to 54f6960 Compare July 26, 2017 23:19
Base automatically changed from master to main March 22, 2021 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant