This will help you to remove console.log and comments from typescript or javascript files using webpack 4
webpack remove console.log
npm i npm install uglifyjs-webpack-plugin --save-dev
const data = [ | |
{ Id: 'a0wcn0000006DxTEST0', SBQQ__RequiredBy__c: '', SBQQ__PartnerTotal__c: 0, Children_Total__c: 0, }, | |
{ Id: 'a0wcn0000006DxTEST1', SBQQ__RequiredBy__c: 'a0wcn0000006DxTEST0', SBQQ__PartnerTotal__c: 1, Children_Total__c: 0, }, | |
{ Id: 'a0wcn0000006DxTEST4', SBQQ__RequiredBy__c: 'a0wcn0000006DxTEST3', SBQQ__PartnerTotal__c: 1, Children_Total__c: 0, }, | |
{ Id: 'a0wcn0000006DxTEST2', SBQQ__RequiredBy__c: 'a0wcn0000006DxTEST1', SBQQ__PartnerTotal__c: 1, Children_Total__c: 0, }, | |
{ Id: 'a0wcn0000006DxTEST3', SBQQ__RequiredBy__c: 'a0wcn0000006DxTEST2', SBQQ__PartnerTotal__c: 1, Children_Total__c: 0, }, | |
] | |
/* Start sort */ |
-------------------------------------------------------------------- | |
-- Queries related to distribution of metadata. | |
-- Find the number of users per profile. | |
SELECT count(id), Profile.name | |
FROM User | |
WHERE User.IsActive = true | |
GROUP BY Profile.name | |
-- Find the distribution of Apex classes per namespace. | |
select count(id), NameSpacePrefix |
alignment top_left | |
background true | |
border_width 1 | |
color1 e100ff | |
color2 D1E7D1 | |
color3 FF0000 | |
color4 FFFFFF | |
cpu_avg_samples 2 | |
default_color D1E7D1 | |
default_outline_color white |
/** | |
* @description Matches name of component - "ui-comp" from `<ui-comp class="ok">EVERYTHING</ui-comp>` | |
* @return {Array} array of matches | |
* @demo regexr.com/6qp3v | |
**/ | |
export function nameUse(s) { | |
return s.match(new RegExp(/(?<=<)((\w*)(-\w*))(-\w*)*/, 'g')); | |
} | |
/** |
function dbl(x){ | |
return x+x | |
} | |
Array.from(Array(30).keys()) | |
.reduce((acc, curr, index) => { | |
acc = acc === 0 ? .01 : dbl(acc) | |
console.log('day ', index+1, ': $', acc) | |
return acc | |
}, 0) |
/** | |
* get a pseudo random address | |
* @param {Integer} val - number to decide what address to return | |
* @return {String} - address | |
*/ | |
public static String getRandomAddress(Integer val) { | |
Integer i = Integer.valueOf(String.valueOf(val).right(1));// get last num; 3, 223, 113 would be 3; | |
if(i == 0){ return '61 North Avenue NW, Atlanta, GA, 30308'; } | |
if(i == 1){ return '210 Peachtree St NW, Atlanta, GA, 30303'; } | |
if(i == 2){ return '12 Cobb Pkwy SE, Marietta, GA, 30062'; } |
This will help you to remove console.log and comments from typescript or javascript files using webpack 4
webpack remove console.log
npm i npm install uglifyjs-webpack-plugin --save-dev
renderedCallback() { | |
// swipe to close | |
this.template | |
.querySelector('div.app') | |
.addEventListener( | |
'touchstart', | |
this.handleTouchStart.bind(this), | |
false | |
); |
/* | |
Usage: | |
1. If you have an XML file URL: | |
const response = await fetch('file_url'); | |
const xmlString = await response.text(); | |
var XmlNode = new DOMParser().parseFromString(xmlString, 'text/xml'); | |
xmlToJson(XmlNode); |
## Deploy | |
Click to deploy can be done at [https://component.land?share=jsmithdev%2Fsortie-list](https://component.land?share=jsmithdev%2Fsortie-list) | |
SFDX deployment instructions can be found at [https://github.com/jsmithdev/sfdx-deploy-instructions](https://github.com/jsmithdev/sfdx-deploy-instructions) | |
--- | |
coded while petting a 🐶 by [Jamie Smith](https://jsmith.dev) |