Hybris exclude Smart Edit grunt from compilation

2.6k Views Asked by At

Is there any way to exclude smart edit grunt rush compile from ant build process? This grunt process adds almost 2 extra minutes to ant build compilation to finish.

3

There are 3 best solutions below

0
On BEST ANSWER

The rush build is triggered inside smartedittools extension so it will exeute even if you don't have an addon installed in your storefront or if you don't have a storefront at all (e.g. when using decoupled frontend like Spartacus)

You can use smartedittools.only.build.once=true flag to tell it to build only once, see comment in smartedittools/project.properties:

# Introduce new flag to skip smartedit build if bundle files(smartedit/apps/smartedit-master/dist/**) already generated.
# Smartedit dev team: Will keep value false by default since Rush incremental build working fine under git working tree.
# Other hybris team and Non-Smartedit partner: Use true to avoid build smartedit everytime in commerce-suite.zip env.
# Smartedit partner: Update the value on-demand, delete the smartedit bundle or change flag to true will build again.
smartedittools.only.build.once=false
1
On

As you are aware from which build.xml macro is getting called, so please comment that macro entry in same build.xml and place in config-->customize directory[it should follow same directory structure of original file]

then run :

ant customize and ant clean all
0
On
  1. Remove the following directory:

    hybris/bin/modules/npm-ancillary/npmancillary/resources/npm/node_modules

  2. Uninstall the addon using the ant addonunistall command (optional, because uninstalling the addon without removing the aforementioned folder won't reduce the build time, but, in my opinion, is better to uninstall it, so the developers working on the project won't be confused):

    ant addonuninstall -Daddonnames=smarteditaddon -DaddonStorefront.yacceleratorstorefront=yourstorefront