Skip to main content
Nintex Community Menu Bar
Question

skuid-grunt individual page


Forum|alt.badge.img+18

Is there an easy way to set up a grunt task so that I can push specific pages back to the server?

I’d like to do something like this:

grunt.initConfig({ 'skuid-push':{&nbsp; &nbsp; &nbsp; 'options': orgOptions,<br>&nbsp; &nbsp; &nbsp; 'production':{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'files':{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src: ['skuidpages/Optimize*', 'skuidpages/Cleanup*']<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; 'specific':{<br>&nbsp; &nbsp; &nbsp; &nbsp; 'files':{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src: ['skuidpages/'<b> + n</b>]<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; } });
grunt.registerTask('push-specific-page', ['skuid-push:specific']);

And then run something like this in the console:

grunt skuid-push:specific("Module1_PageName");


But it’s not clear to me if there’s actually a way to do that without hard-coding the page into the gruntfile each time. Any pointers on this?

Translate
Did this topic help you find an answer to your question?
This topic has been closed for comments

5 replies

Forum|alt.badge.img+13

Matt - Take a look at grunt.option (http://gruntjs.com/api/grunt.option).  I think this should give you what you are looking for.

Translate

Forum|alt.badge.img+1

Matt,
Barry is correct. grunt.option would be your best bet. You’re snippet above wouldn’t have change much at all. 

grunt.initConfig({

'skuid-push':{'options': orgOptions,<br>&nbsp; &nbsp; &nbsp; 'production':{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'files':{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src: ['skuidpages/Optimize*', 'skuidpages/Cleanup*']<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; 'specific':{<br>&nbsp; &nbsp; &nbsp; &nbsp; 'files':{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src: ['skuidpages/'<b> + grunt.option('page')</b>]<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; } });


This will give you the ability to push any single or number of pages that you specify at runtime.  The command would look something like this:

grunt skuid-push:specific --page="Module_SomeSinglePage.xml" 

or

grunt skuid-push:specific --page="AllPagesInModule_*" 



Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 10, 2024

Thanks, Ethan.

Translate

Forum|alt.badge.img+4

Matt, is it possible to set up a grunt task to pull down page by page?

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 10, 2024

Not that I’m aware of. @Ethan?

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings