Skip to main content
Nintex Community Menu Bar

https://bitbucket.org/skuid/skuid-grunt

This will be amazing! Can’t wait for the skuid page api.

Huh! What! When! DEEP DIVE?


exactly what I’m thinking!


Any plans for Gulp?


When is update 7 going to be released?


Just took a cursory look at this and this is going to be incredible!  I’ve been planning on implementing something at the page level for a long time but there was no straightforward way to do this without SOQL to the Page SObject itself.  

An API, this is awesome!  And open source enabling contributions, even better!

In my current build process, I use dmc (https://www.npmjs.com/package/dmc) to manage org credentials and nforce & nforce-metadata to interact with SFDC.  Need to take a closer look at skuid-grunt but adding dmc as the credentials backbone would be a great way to improve credential management and avoid hardcoding creds in config file.  Another interim option would be to use environment variables.

Thank you!!


dmc looks interesting. Environment variables would definitely be recommended right now, and this would be ideal for using skuid-grunt within a Continuous Integration process as you could set environment variables differently for each CI build / deployment task, e.g.

var orgOptions = {
   clientId: process.env.SKUID_GRUNT_CLIENT_ID,
   clientSecret: process.env.SKUID_GRUNT_CLIENT_SECRET,
   username: process.env.SKUID_GRUNT_USERNAME,
   passowrd: process.env.SKUID_GRUNT_PASSWORD
};




We ran into some snags which has made Update 7 take longer than expected, but we’re hoping for tomorrow afternoon.


Yep, exactly.  The environment variables would allow you to build grunt targets based on purpose rather than environment/purpose combo.

dmc has worked out really well for me thus far, although I’ll admit to just starting to make the jump over to it.

dmc grew out of grunt-ant-sfdc (https://github.com/kevinohara80/grunt-ant-sfdc) which offered hardcoded and environment variable style configuration.


Update 7 is available now from the Skuid Releases page.
Get the Latest Skuid Releases & Everything That Came Before


Ok, definitely feeling like this is awesome, but a bit over my head.

Trying to set this up, and I think I’ve successfully installed node.js, grunt, and skuid-grunt… but not sure how to create the gruntfile. where do I get my client id and client secret?

Can anyone point me to some resource which has detailed setup steps?


Woah! This sounds incredible.
Gonna be a whole lotta fun to learn and implement!


Creating the Gruntfile is as easy creating a new file called Gruntfile.js and using the template from the README, which we updated yesterday with some additional information to help you get started.

There is a link about how to setup a Connected App and get your Client ID and Client Secret. 


Ah, thanks. I missed the link for setting up the Connected App


Just got this working… and it’s as amazing as expected.

Thanks, Skuid!


OK, another question: do I have to install grunt and skuid-grunt to each project directory, or is there a way I can install grunt once and use it everywhere?


Matt, it all depends on what you’re trying to accomplish.

If you’ve got multiple Force.com projects / orgs that you’re managing, and you’ve got these projects in source control / you want to be able to pull down and push changes to Skuid Pages separately for each of these projects / orgs, then the recommended approach would be to install skuid-grunt in each project directory. It will be much easier to manage your Skuid Pages relative to / in context of each Force.com project / org separately, rather than trying to have just one directory with a complex Gruntfile with multiple pull and push targets for each org, where you’d have to do grunt like this: grunt pull:sandbox1, dumping pages into sandbox1/skuidpages or something like that. Managing Skuid Pages in context of a Force.com project / org is highly recommended.


Thanks, Zach.

If I have a central developer org that I’m using to push skuid pages to multiple production orgs, how would you recommend that I structure it?


Hey Matt -

Installing grunt and using grunt are two different things 🙂  

You can install grunt globally (npm install -g grunt-cli) and then use it from any node js terminal/command window.

Taking from what Zach was recommending, once grunt is installed, you’d want to have skuid-grunt installed on a per project basis.  When installing npm plug-ins, you can use the “–save-dev” option and this will automatically update your packages.json file.  You’ll then commit your gruntfile.js and packages.json in to your VCS.

In your particular situation, since you are only using a single DE Org and pushing to multiple prod orgs, I would do the following:

1) Install grunt globally (or choose to just install in the current directory)
2) Initialize a package file (npm init) in the project folder
3) Create gruntfile.js by hand or use the grunt-init module (http://gruntjs.com/project-scaffolding)
4) create a target for each of your deploy destinations

If you had multiple orgs/multiple projects in VCS, you would repeat 2-4 for each project

Note that when you pull down code from VCS to a new machine/folder, this will bring your packages.json and gruntfile.js with the pull.  From there, you can just run “npm install” and it will automatically install any node modules in the packages.json file.


Matt- I will be updating the skuid-grunt repo with some example configurations sometime this morning. Keep an eye out. Hopefully it will help!


Thanks Barry and Ethan! Very helpful.


For anyone looking to use gulp (as I have), just do the setup as normal, then import the task using gulp-grunt and run it as part of you gulp tasks


For anyone interested in getting started with skuid-grunt, we’ve added a scaffolding project with a step-by-step walkthrough! 

https://bitbucket.org/skuid/skuid-grunt-starter


beautiful! works like a charm. Could there be a section in there on pushing/pulling component packs as well?

edit: I love the environment variables. bravo!


Thanks!

Component Packs are just Static Resources which Salesforce provides deployment tools for. There are Grunt plugins and node modules for deploying your Metadata that could be worked into your build/deployment workflow.


figures… Alrighty then, thanks!


Reply