Skuid component deployment using gulp.js.
Note: this is a hacky-in-between-major-upgrades version of our build file. Its currently in a state of major overhaul and we expect large portions of what is being done by gulp tasks to be replaced by a frontend packager.
This section has two parts. You already did the initial setup part by downloading this repo.
First part:
-
Your working directory for this (example, npm script omitted) repository is assumed to be called
CompanyComponents
. You should now open a command-line window/terminal there (in Windows: by shift-right-clicking anywhere in the folder and "Open command window here"). -
Install Node.js globally on your system. (downloads, instructions for Windows).
-
From the console, make sure you can now run
npm
. It should display the help, and version number of npm. -
Run
npm install
. That sets up the app, grabbing all dependencies needed by the project and installing them to a local node_modules folder. -
If you run any of the automation now you'll get an error saying Gulp needs to be installed globally. So from the repo dir again, run
npm install gulp -g
-
Once finished, make sure
npm ls
returns a load of stuff.
-
Running the
gulp
command in the console set at the components' directory will run the default task of listing all available gulp tasks. -
Create a
.env
file in your working directory with the following two lines:(case-sensitive)
Company_USERNAME="username@org.com"
Company_PASSWORD="passwordAndSecurityTokenConcatenated"
You will eventually need to create additional entries for each org you wish to deploy component packages to.
-
Make sure you can connect to the org with your credentials.
-
To deploy, run
gulp deploy
to automatically build and create the static resource and upload it to SF using jsforce! -
You should now be good to go.
-
If you don't have it already, install Package Control, the sublime package manager.
-
Now, we go about installing some packages:
sublime-gulp (and here's a guide),
sublime-jsdocs (reccommended),
GitGutter (reccommended)
-
With all that installed, you should be able to right-click a file in the FOLDERS tree in Sublime's sidebar [right-click] → Gulp → "List Tasks to Run". That should show the various build options. Run the
default
build and doCtrl + ~
on your keyboard to show the console in Sublime, and observe the output. -
Assuming all went well you should be good to develop components and use interactive builds!