File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,23 @@ function transform(componentPath) {
127127 }
128128 debug ( `${ componentPath } : templatePath: %o` , templatePath ) ;
129129
130- // TODO set `tagName: ''` and remove `attributeBindings`, `classNames`, ...
130+ // TODO set `tagName: ''`
131+
132+ // remove `elementId`, `attributeBindings`, `classNames` and `classNameBindings`
133+ j ( properties )
134+ . find ( j . ObjectProperty )
135+ . filter ( path => path . parentPath === properties )
136+ . filter (
137+ path =>
138+ isProperty ( path , 'elementId' ) ||
139+ isProperty ( path , 'attributeBindings' ) ||
140+ isProperty ( path , 'classNames' ) ||
141+ isProperty ( path , 'classNameBindings' )
142+ )
143+ . remove ( ) ;
144+
145+ fs . writeFileSync ( componentPath , root . toSource ( ) , 'utf8' ) ;
146+
131147 // TODO wrap existing template with root element
132148}
133149
You can’t perform that action at this time.
0 commit comments