One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #!/bin/sh | |
| # | |
| # author : benahm | |
| # description : deploy a destructive change | |
| # inputs | |
| TARGET_ENV=$1 | |
| SOURCE_PATH=$2 | |
| # constants |
| { | |
| "version": "2.0.0", | |
| "tasks": [ | |
| { | |
| "label": "SFDX: Deploy Current File", | |
| "type": "shell", | |
| "command": "sfdx", | |
| "args": [ | |
| "force:source:deploy", | |
| "--sourcepath", |
| function flattenObject(ob) { | |
| let toReturn = {}; | |
| let flatObject; | |
| for (let i in ob) { | |
| console.log(i+ ' ' + typeof(ob[i])); | |
| if (!ob.hasOwnProperty(i)) { | |
| continue; | |
| } | |
| //Exclude arrays from the final result | |
| //Check this http://stackoverflow.com/questions/4775722/check-if-object-is-array |
| /* | |
| * Flatten Object @gdibble: Inspired by https://gist.github.com/penguinboy/762197 | |
| * input: { 'a':{ 'b':{ 'b2':2 }, 'c':{ 'c2':2, 'c3':3 } } } | |
| * output: { 'a.b.b2':2, 'a.c.c2':2, 'a.c.c3':3 } | |
| */ | |
| var flattenObject = function(ob) { | |
| var toReturn = {}; | |
| var flatObject; | |
| for (var i in ob) { | |
| if (!ob.hasOwnProperty(i)) { |
| var flattenObject = function(ob) { | |
| var toReturn = {}; | |
| for (var i in ob) { | |
| if (!ob.hasOwnProperty(i)) continue; | |
| if ((typeof ob[i]) == 'object') { | |
| var flatObject = flattenObject(ob[i]); | |
| for (var x in flatObject) { | |
| if (!flatObject.hasOwnProperty(x)) continue; |