View aliases.cmd
@echo off
DOSKEY spfx-new=yo @microsoft/sharepoint --package-manager pnpm
View update.drip.euconsent.js
const auth = {
token: '...', // get from your user settings in Drip admin
accountId: 007
};
const client = require('drip-nodejs')(auth);
const payload = {
subscribers:[{
email:'voitanosllc@contoso.com',
eu_consent:'granted'
View normalizeSolutionDefinition.js
function createFeatureFromComponent(component) {
return {
title: `${component.name} Feature`,
description: `A feature which activates the Client-Side ${component.manifest.componentType} named ` +
`${component.name}`,
// id: uuid.v4(), <<< old, pre v1.4.1 way of generating the Feature ID
id: component.id || uuid.v4(),
// or generate a new uuid if it doesn't (e.g. for client-side assets feature)
components: [component],
assets: {
View spfxServeTask.js
_loadGulpConnect() {
// this will raise an exception if it can't find http2,
// which happens if we are on Node6 and 'http2' has not been required yet
let http2CacheKey = 'http2';
try {
http2CacheKey = require.resolve('http2');
}
catch (exception) {
// no-op
}
View spsite-appcatalog-remove.sh
spo site appcatalog remove --url https://voitanos.sharepoint.com/sites/some-site-collection
View spsite-appcatalog-add.sh
spo site appcatalog add --url https://voitanos.sharepoint.com/sites/some-site-collection
View npm-errors.log
npm ERR! missing: archy@^1.0.0, required by nyc@11.3.0
npm ERR! missing: arrify@^1.0.1, required by nyc@11.3.0
npm ERR! missing: caching-transform@^1.0.0, required by nyc@11.3.0
npm ERR! missing: convert-source-map@^1.3.0, required by nyc@11.3.0
npm ERR! missing: debug-log@^1.0.1, required by nyc@11.3.0
npm ERR! missing: default-require-extensions@^1.0.0, required by nyc@11.3.0
npm ERR! missing: find-cache-dir@^0.1.1, required by nyc@11.3.0
npm ERR! missing: find-up@^2.1.0, required by nyc@11.3.0
npm ERR! missing: foreground-child@^1.5.3, required by nyc@11.3.0
npm ERR! missing: istanbul-lib-coverage@^1.1.1, required by nyc@11.3.0
View index.ts
//web components ES5 shim
import '../../../elements/wc-shim'
import { registerAsCustomElements } from '@angular/elements';
import { platformBrowser } from '@angular/platform-browser'
import { HelloWorld, HelloWorldModule } from './hello-world'
import { HelloWorldModuleNgFactory } from './hello-world.ngfactory'
registerAsCustomElements([HelloWorld], () => platformBrowser().bootstrapModuleFactory(HelloWorldModuleNgFactory, {ngZone: 'noop'}))
.catch(err => console.log(err));
View NgHelloWorldWebPart.ts
import './elements'
import { HelloWorld } from './elements/hello-world'
import {
BaseClientSideWebPart, IPropertyPaneConfiguration, PropertyPaneTextField
} from '@microsoft/sp-webpart-base';
export default class NgHelloWorldWebPartWebPart extends BaseClientSideWebPart<HelloWorld> {
constructor(){ super(); }
ngElement: HTMLElement;