|
|
@ -153,7 +153,7 @@ export default function dom(
|
|
|
|
function ${name} ( options ) {
|
|
|
|
function ${name} ( options ) {
|
|
|
|
${options.dev &&
|
|
|
|
${options.dev &&
|
|
|
|
`if ( !options || (!options.target && !options._root) ) throw new Error( "'target' is a required option" );`}
|
|
|
|
`if ( !options || (!options.target && !options._root) ) throw new Error( "'target' is a required option" );`}
|
|
|
|
this.options = options;
|
|
|
|
this.options = options || {};
|
|
|
|
${generator.usesRefs && `this.refs = {};`}
|
|
|
|
${generator.usesRefs && `this.refs = {};`}
|
|
|
|
this._state = ${templateProperties.data
|
|
|
|
this._state = ${templateProperties.data
|
|
|
|
? `@assign( @template.data(), options.data )`
|
|
|
|
? `@assign( @template.data(), options.data )`
|
|
|
|