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
-------------------------------------------------------------------- | |
-- 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 |
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
/* | |
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); |
<apex:page> | |
<head> | |
<script src="{!$Resource.jquery224}"></script> <!-- https://jquery.com/ --> | |
<script src="{!$Resource.jsforce170}"></script> <!-- https://jsforce.github.io/ --> | |
<script>$j = jQuery.noConflict();</script> | |
</head> | |
<body> | |
<form> |
const atob = a => Buffer.from(a, 'base64').toString('binary') | |
module.exports = { atob } |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
async function something() { | |
console.log("this might take some time...."); | |
await delay(5000); | |
console.log("done!") | |
} | |
something(); |
/* | |
// Example implementation as follows: | |
public class AWSS3_GetService extends AWS { | |
public override void init() { | |
endpoint = new Url('https://s3.amazonaws.com/'); | |
resource = '/'; | |
region = 'us-east-1'; | |
service = 's3'; | |
accessKey = 'my-key-here'; | |
method = HttpMethod.XGET; |
@isTest | |
private class ContentDocumentTest { | |
private static testMethod void testCreate() { | |
ContentVersion contentVersion_1 = new ContentVersion( | |
Title = 'Penguins', | |
PathOnClient = 'Penguins.jpg', | |
VersionData = Blob.valueOf('Test Content') | |
IsMajorVersion = true | |
); | |
insert contentVersion_1; |
import { LightningElement } from 'lwc'; | |
import moment from '@salesforce/resourceUrl/moment'; | |
import { loadScript } from 'lightning/platformResourceLoader'; | |
export default class MomentStuffs extends LightningElement { | |
renderedCallback(){ | |
Promise.all([ | |
loadScript(this, moment + '/moment.js') | |
]).then(() => { |
#!/bin/bash | |
if [ $# -lt 1 ] | |
then | |
echo Usage: generatepkgXML.sh orgalias packageName | |
exit | |
fi | |
## Retrieve the PackageXML from Unmanaged Container |