SFDX plugin for managing Skuid metadata
npm install skuid-sfdxskuid-sfdx
==========
SFDX plugin for managing Skuid metadata





* Installation
* Usage
* Commands
* Contributing
First, ensure you have installed sf cli.
Now, install the skuid-sfdx plugin:
``sh-session`
echo 'y' | sf plugins:install skuid-sfdx
Note: When you install an sfdx plugin, it will ask you to trust the plugin by typing y. The echo 'y' above skips that step as a convenience.
Why do this? Currently, only Salesforce's internal developers can sign plugins. Because other plugin creators cannot sign their SFDX plugins so they are "trusted," the echo 'y' is necessary for the time being.
To use skuid-sfdx in a CI environment, you will either need to auto-trust the plugin with echo 'y' as above or add the plugin to a whitelist of trusted SFDX plugins, as described in the "CI and CD Impact" section of this Salesforce blog post.
To pull Skuid Pages from a Salesforce org to the filesystem, use the skuid page pull command. You can use various arguments to specify which Pages in the org you want to pull, and you can output the pages to a directory of your choice.
For each Page, two files will be written:
- an XML file containing the Page's layout
- a JSON file containing metadata about the Page
`sh-session
$ sf skuid page pull
Wrote 85 pages to skuidpages
$ sf skuid page pull --module SamplePages --dir pages/sample
Wrote 4 pages to pages/sample
`
Page XML will be pretty-printed, with indentation automatically added, to make it easy to review and commit changes to Skuid Pages line-by-line to source control. (Note: tabs are used for indentation by default, but if you would like to use a different indentation, you can set the SKUID_XML_INDENT environment variable, e.g. export SKUID_XML_INDENT=" " to use 2 spaces instead of tabs.)
Going the other direction, to move Skuid Pages from the filesystem up to a Salesforce org, use the skuid page push command. You can use file glob patterns to specify which Pages in your filesystem that you want to push, for example:
`sh-session
$ sf skuid page push salesapp/Foo
3 Pages successfully pushed.
`
`
Pull Skuid Pages from a Salesforce org into a local directoryUSAGE
$ sf skuid page pull [-m ] [-p ] [--nomodule] [-d ] [-o ] [--apiversion ] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-d, --dir=dir Output directory to write pages to.
-m, --module=module Module name(s), separated by a comma.
-p, --page=page Page name(s), separated by a comma.
-o, --target-org alias for the target org, replaces the previous -u flag,
--apiversion=apiversion override the api version used for api requests made by this command
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for this command invocation
--nomodule Retrieve only those pages that do not have a module
EXAMPLES
$ sf skuid page pull -o myOrg --module CommunityPages
$ sf skuid page pull --nomodule
$ sf skuid page pull --page Page1,Page2,Page3 --dir newpages
`*
sf skuid page push`
Push Skuid Pages from a directory to Skuid.USAGE
$ sf skuid page push [-d ] [-o ] [--apiversion ] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-d, --dir=dir Source directory in which page files reside.
-o, --target-org alias for the target org, replaces the previous -u flag,
--apiversion=apiversion override the api version used for api requests made by this command
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for this command invocation
EXAMPLES
$ sf skuid page push -o myOrg
$ sf skuid page push skuidpages/*
$ sf skuid page push -d=salespages SalesApp*
$ sf skuid page push pages/SalesAppHome.xml pages/CommissionDetails.xml
$ sf skuid page push */
`
Contributing
To get started with contributing to this plugin locally, clone the repo and then link the plugin to sfdx so that it will appear within your sfdx commands list:
Setup
`sh-session
git clone https://github.com/skuid/skuid-sfdx.git
cd skuid-sfdx
yarn
sf plugins:link
`Orientation
Logic for each command (e.g.
skuid page pull) is defined within a specific file under src/commands, within a folder structure corresponding to that plugin's namespace (e.g. the pull command is within skuid/page directory).Tests
Tests are located within a matching directory under
test/commands.To run tests:
`sh-session
npm test
`When adding / modifying commands, please update the README with the latest output of running the command's
--help`.