0.0.1 • Published 4 years ago

sfdx-bundle v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

sfdx-resource

An SFDX plugin for working with static resources and resource bundles

Version Codecov Greenkeeper Known Vulnerabilities Downloads/week License

$ npm install -g sfdx-bundle
$ sfdx COMMAND
running command...
$ sfdx (-v|--version|version)
sfdx-bundle/0.0.1 win32-x64 node-v10.15.1
$ sfdx --help [COMMAND]
USAGE
  $ sfdx COMMAND
...
For installing the plugin  (make sure you have sfdx installed and updated first):

$ sfdx plugins:install sfdx-resource


For taking a directory in the root/bundles (in this example called resource name) and converting it to a static resource, use the bundle command:

$ sfdx resource:bundle <resourcename>

$ sfdx resource:bundle <resourcename> -n MyStaticResource -d A description of my static resource

$ sfdx resource:bundle --help

For extracting a static resource in a SFDX project, so that you can modify the contents, use the unbundle command:

$ sfdx resource:unbundle <resourcename>

$ sfdx resource:unbundle --help

sfdx resource:bundle [-h <help>] [-p] [-n <string>] [-d <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Bundles / zips the resource directory in the bundles directory at the root of an SFDX project and creates / updates the static resource.

USAGE
  $ sfdx resource:bundle [-h <help>] [-p] [-n <string>] [-d <string>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

ARGUMENTS
  RESOURCE  The name of the directory to bundle.  This directory must exist in ./bundles

OPTIONS
  -d, --description=description                                                     (Optional). If specified, determines
                                                                                    the description of the static
                                                                                    resource.  If not specified,
                                                                                    defaults to the name of the
                                                                                    unbundled directory.

  -h, --help                                                                        show CLI help

  -n, --name=name                                                                   (Optional). If specified, determines
                                                                                    the name of the static resource.  If
                                                                                    not specified, name is defaulted to
                                                                                    the name of the unbundled directory.

  -p, --private                                                                     If set to true, then the static
                                                                                    resource is set to Private Cache
                                                                                    Control.  Public, otherwise.

  --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

EXAMPLE
  $ sfdx resource:bundle bundle resource

See code: lib\commands\resource\bundle.js

sfdx resource:unbundle [-h <help>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

Unzips / unbundles a static resource into a bundles directory at the root of an SFDX project.

USAGE
  $ sfdx resource:unbundle [-h <help>] [--json] [--loglevel 
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

ARGUMENTS
  RESOURCE  The name of the static resource to unzip / unbundle.  Omit .resource from the name.  For a static resource
            named Example.resource, use 'Example'

OPTIONS
  -h, --help                                                                        show CLI help
  --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

EXAMPLE
  $ sfdx resource:unbundle <resource>

See code: lib\commands\resource\unbundle.js