cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

adding a new decorator to smartedit - ngtemplates and concat

former_member903086
Discoverer
0 Likes
760

Hello,
I'm trying to add a new decorator to a custom Smartedit extension according to this guide:
https://help.hybris.com/6.7.0/hcd/7cebd4f5dc2a430fbe878f88baf2bd9c.html
but I can't figure out where to put ( I mean in which file/section) these code excerpts:

 ngtemplates: {
             options: {
                 standalone: true, //to declare a module as opposed to binding to an existing one
                 module: 'myModuleTemplates'
             },
             run: {
                 src: ['web/features/**/*Template.html'],
                 dest: 'jsTarget/web/features/templates.js'
             }
         }

and

 concat: {
             options: {
                 separator: ';'
             },
             dist: {
                 src: ['web/features/features/**/*.js', 'some other pattern'],
                 dest: 'jsTarget/myModule.js'
             },
         },

Can anyone help?
Thanks
ello

Accepted Solutions (0)

Answers (1)

Answers (1)

geffchang
Active Contributor
0 Likes

My understanding of the Help site you linked is that there is a Gruntfile.js file in your custom SmartEdit extension, and you need to define it there.

Check this file, as sample: backoffice/node_modules/grunt-angular-templates/Gruntfile.js

Reference:

former_member903086
Discoverer
0 Likes

Thanks Geff. Actually I tried to add them to Grunt.js but I don't know how to put it, I mean in which section of the file. I did a lot of attempts modifying it in different ways but I could not get any successful build.

geffchang
Active Contributor
0 Likes

Did you check the Gruntfile.js from backoffice? It might give you an idea.

former_member903086
Discoverer
0 Likes

There's no Gruntfile.js in backoffice but I checked the existing ones in the other extensions, I could not replicate successfully anything from them