Picture of Łukasz Grela
grunt config scheme
by Łukasz Grela - Wednesday, 11 February 2015, 8:11 AM
 

Hi,

I've tried to use on latest adapt framework the adapt-menu-singlePageCourse but found that it wasn't working, during build it always was pointing to the adapt-contrib-boxMenu which was uninstalled. I've looked into Gruntfile.js and found that when grunt.option('menu') is empty/undefined then it defaults to "adapt-contrib-boxMenu".

What I have to do to have it configurable (where grunt.option comes from)? Is the modification of Gruntfile.js to pick adapt-menu-singlePageCourse by default is the only way?

This question also applies for themes as it is also with default values.

        theme = grunt.option('theme') || 'adapt-contrib-vanilla',
        menu = grunt.option('menu') || 'adapt-contrib-boxMenu';

Picture of Tom Taylor
Re: grunt config scheme
by Tom Taylor - Wednesday, 11 February 2015, 10:17 AM
 

Hi Łukasz,

You're quite right; you now need to specify when you build if you're using a theme or menu other than adapt-contrib-vanilla and adapt-contrib-boxMenu. This has been changed for compatibility with the Adapt Builder, which requires several menus to be installed, while only building one.

To specify a custom theme/menu, you'll need to set the grunt option flags:

grunt build --theme="new-theme-name" --menu="new-menu-name"

(you can omit any that you don't need).

We're looking at changing this to default to *, so that if you don't specify a custom menu/theme, the entire menu and theme folders are built (which is how it worked before). I've just created an issue on GitHub here, so if you could add any thoughts/+1, that'd be helpful :)