Picture of Rob Mausser
Way to have certain code only process with Grunt Dev and not Grunt Build?
by Rob Mausser - Thursday, 16 July 2020, 3:59 PM
 

We use both Dev-Tools extension and Shadow-ID's extension to speed up development process of the framework

https://github.com/cgkineo/adapt-devtools

https://github.com/darylhedley/adapt-shadowIds

 

However every so often someone makes the mistake of not turning them off for the final build, which is obviously not a good thing!

Is there a way to have a line of code in JS or something that says "only build this if grunt dev command is used, not grunt build" So when we are working on the framework  with the Grunt Dev command, they show up, but on final build with Grunt Build they dont?

Any other similar method or solution is greatly appreciated, this is just how I would forsee it working. If you have a different idea that works too, im all ears

Thank you!!!

Sincrerely, a guy that keeps forgetting to remove the development tools before final build :P

Picture of Oliver Foster
Re: Way to have certain code only process with Grunt Dev and not Grunt Build?
by Oliver Foster - Thursday, 16 July 2020, 8:49 PM
 

Hi Rob,

 

No, we don't have such a thing yet. Could you post an issue on the adapt_framework repo on github? I'll have a look.

 

Warm Regards,

 

Ollie

Picture of Rob Mausser
Re: Way to have certain code only process with Grunt Dev and not Grunt Build?
by Rob Mausser - Thursday, 16 July 2020, 8:50 PM
 

Will do thank you!!

Picture of Oliver Foster
Re: Way to have certain code only process with Grunt Dev and not Grunt Build?
by Oliver Foster - Thursday, 16 July 2020, 9:32 PM
 

Can you have a test of https://github.com/adaptlearning/adapt_framework/pull/2837 and https://github.com/cgkineo/adapt-devtools/pull/45 please? Write comments on each accordingly.

I'm not sure about the new property name in devtools, suggestions welcome.