https://github.com/jsforce/grunt-jsforce-deploy
A grunt task for deploying Salesforce package using JSforce (no Migration Tool dependency)
https://github.com/jsforce/grunt-jsforce-deploy
Last synced: about 1 year ago
JSON representation
A grunt task for deploying Salesforce package using JSforce (no Migration Tool dependency)
- Host: GitHub
- URL: https://github.com/jsforce/grunt-jsforce-deploy
- Owner: jsforce
- Created: 2015-02-20T07:06:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-19T02:06:51.000Z (almost 11 years ago)
- Last Synced: 2025-03-30T15:47:01.873Z (about 1 year ago)
- Language: JavaScript
- Size: 124 KB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grunt-jsforce-deploy
[](https://travis-ci.org/jsforce/grunt-jsforce-deploy)
A grunt task for deploying Salesforce package, using JSforce's Metadata API feature.
As it is implemented purely in Node.js, you do not have to setup Force.com Migration Tool (Ant, Java) anymore.
## Setup
```
$ npm init
$ npm install grunt grunt-jsforce-deploy --save-dev
```
## Example
### Project Directory
```
├── Gruntfile.js
├── package.json
└── pkg
├── classes
├── objects
├── package.xml
├── pages
└── staticresources
```
### Gruntfile.js
```javascript
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-jsforce-deploy");
grunt.initConfig({
jsforce_deploy: {
pkg: {
expand: true,
cwd: ".",
src: [ "pkg/**" ]
},
options: {
username: process.env.SF_USERNAME,
password: process.env.SF_PASSWORD,
// loginUrl: "https://test.salesforce.com",
// pollTimeout: 120*1000, // set polling timeout to 120sec (default is 60sec)
// pollInterval: 10*1000, // set polling interval to 10sec (default is 5sec)
}
}
});
grunt.registerTask("deploy", [ "jsforce_deploy" ]);
};
```
### Deploy
```
$ SF_USERNAME=username@example.com SF_PASSWORD=yourpassword grunt deploy
```
or if you have `foreman` installed, create `.env` file with above credential information, and execute :
```
$ foreman run grunt deploy
```