npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular-cli-sfdc-deploy

v0.1.1

Published

deploy your app to Salesforce as a static resource via angular-cli

Downloads

6

Readme

angular-cli-sfdc-deploy

Angular CLI addon for deploying apps to Salesforce.

Installation & Setup

This addon has the following prerequisites:

To install this addon all you need to do is install angular-cli-sfdc-deploy via npm:

npm install --save-dev angular-cli-sfdc-deploy

Usage

Once that's done, you run ng sfdc:deploy to build your app and deploy to Salesforce as a static resource.

Authentication

If you do not provide any credentials you will be prompted for them. If this annoys your CI build then you can use the --no-prompt flag to disable.

Options

You can display all options with the command ng --help sfdc:deploy. It will output the text below:

ng sfdc:deploy <options...>
  Deploy your app to Salesforce as a static resource
  --environment (String) The Angular environment to create a build for
  --verbose (Boolean) Print lots of details
  --skip-build (Boolean) skip ng build
  --name (String) name of the static resource
  --description (String) description of the static resource
  --poll-interval (Number) polling interval
  --poll-timeout (Number) polling timeout
  --login-url (String) salesforce server url (i.e. https://login.salesforce.com)
  --username (String) salesforce username
  --password (String) salesforce password
  --no-prompt (Boolean) do not prompt for salesforce credentials
  --config-file (String) (Default: sfdcDeploy.json) location of a config file for this command
  --deploy-dir (String) location of the deploy folder

Configuration

There are several ways to configure the sfdc:deploy command. I will list them below in order of precedence:

  1. options flags passed directly to the command.
  2. options configuration file - looks for sfdcDeploy.json by default.
  3. addon configuraton section in angular-cli.json.

Options configuration file

This is a json file that you can use to default any option that can be passed to the command. This is most useful for when you want to override any configuration options specificed in angular-cli.json, but you don't want to check them into version control. By convention these options use camelCase over kebab-case. Example File:

{
  "name": "myApp",
  "description": "My Angular 2 app",
  "environment": "prod",
  "verbose": true,
  "skipBuild": false,
  "pollInterval": 5000,
  "pollTimeout": 60000,
  "loginUrl": "https://login.salesforce.com",
  "username": "[email protected]",
  "password": "secret",
  "noPrompt": true
}

angular-cli.json addon configuration

You can specify the same options above in your angular-cli.json config. Example:

{
  "project": {...},
  "apps": [{...}],
  "addons": [{
    "sfdc": {
      "name": "contactsApp",
      "description": "My Angular 2 app"
    }
  }],
  ...
}

I'm not really sure if the angular-cli team expects this kind of configuration, so it could break in future versions of angular-cli.

Tips

Deploy Merging

Note that this plugin does not delete your existing deploy directory. It will instead attempt to merge your code into it and update the package.xml. If you don't like this behavior you can add the following script to your package.json: "deploy": "rm -rf deploy && ng sfdc:deploy" The reason for doing a merge is so you can also include other assets in your deploy folder such as a visualforce page. These assets will also get deployed with your static resource.

License

Licensed under the MIT license