@mikezimm/npmfunctions
TypeScript icon, indicating that this package has built-in type declarations

2.1.92 • Public • Published

npmFunctions

Moving my common functions to it's own separate npm package

Reference posts I've used to cobble up my package:

https://medium.com/cameron-nokes/the-30-second-guide-to-publishing-a-typescript-package-to-npm-89d93ff7bccd https://github.com/tonysneed/Demo.VSCode.TypeScript/issues/2

and finally: https://indepth.dev/posts/1164/configuring-typescript-compiler

Building this package

npm config set init-author-name "Mike Zimmerman"
npm set init-liscense "ISC"
npm init --scope=@mikezimm
tsc --init
tsc
npm install @pnp/spfx-controls-react
npm install @types/webpack-env
npm install @types/es6-promise
npm install --save-dev prettier tslint tslint-config-prettier

NOTE: added install prettier and tslint line after trying to update version. Error did not arise when doing inital

npm install react-json-view // May 16, 2022 for new Banner npm i --save-dev @types/react // Aug 25, 2022 to solve React import error - didn't have Types

Copy-Item "C:\Users\dev\Documents\GitHub\npmFunctions\src\CSS" -filter '*.css' "C:\Users\dev\Documents\GitHub\npmFunctions\dist\CSS" -recurse -verbose

Copy-Item -Path "C:\Users\dev\Documents\GitHub\npmFunctions\src" -filter '*.css' -Destination "C:\Users\dev\Documents\GitHub\npmFunctions\dist" -recurse -verbose Result: - adds extra folder later for some reason: \dist\src... Performing the operation "Copy File" on target "Item: C:\Users\dev\Documents\GitHub\npmFunctions\src\Services\PropPane\GrayPropPaneAccordions.css Destination: C:\Users\dev\Documents\GitHub\npmFunctions\dist\src\Services\PropPane\GrayPropPaneAccordions.css".

Copy-Item "C:\Users\dev\Documents\GitHub\npmFunctions\src" -filter '*.css' "C:\Users\dev\Documents\GitHub\npmFunctions\dist" -recurse -verbose

General Update process:

  1. Update version in package.json

  2. Update version in package-lock.json

  3. Delete dist folder

Do this BEFORE TSC Copy-Item "C:\Users\dev\Documents\GitHub\npmFunctions\src" -filter '*.css' "C:\Users\dev\Documents\GitHub\npmFunctions\dist" -recurse -verbose

  1. Run tsc

  2. npm whoami

  3. npm login - if neccessary

  4. Run npm publish --access=public

To use specific version

npm install @mikezimm/npmfunctions@2.1.92

current tsc error: Found 109 errors in 33 files

VersionHistory

@2.1.91 - fix src\HelpPanelOnNPM\banner\SinglePage\SinglePage.tsx when content is null

@2.1.90 - getNumberArrayFromString, fix sortNumberArray (was sorting as strings ) @2.1.90 - Add to IQuickCommands: const CommandCaptchaTestFailed, CommandCaptchaRequiredFailed

@2.1.89 - For SPA, set Banner Title = Page title when property is empty. https://github.com/mikezimm/drilldown7/issues/243 Add Const text labels for IQuickCommands for Drilldown updates Add pageArrowStyles prop to PageArrows component https://github.com/mikezimm/drilldown7/issues/250

@2.1.88 - Add 3 more itterations of IPerformance - Add '0', '11', and '12' for ALVFinMan 'fetch0', ... , 'fetch11' , 'fetch12' , 'analyze0', ... , 'analyze11' , 'analyze12' , 'setting0', ... , 'setting11' , 'setting12' , 'process0', ... , 'process11' , 'process12' , 'render0', ... , 'render11' , 'render12' , 'save0', ... , 'save11' , 'save12' ,

@2.1.87 - add str0, strPrev, strNext prop to IQuickButton. For auto build commands https://github.com/mikezimm/Pnpjs-v2-Upgrade-sample/issues/25

@2.1.86 - Add repolinks for Pnpjs-v2-Upgrade-sample and ListAPaLooza web parts

@2.1.85 - Add toggleCallback to Accordion for FieldList Prop Pane

@2.1.84 - Update VisitorPanelContact imageUrl when could be error: https://github.com/mikezimm/ALVFinMan/issues/141

@2.1.83 - Set Banner Panel Pages to undefined instead of null: https://github.com/mikezimm/ALVFinMan/issues/171

@2.1.82 - Fix '*' in getHighlightedText: https://github.com/mikezimm/ALVFinMan/issues/123 Update getFPSUser to dup common props like ID,Id Title, title

@2.1.81 - ESLint updates: Add keys to: many items

@2.1.80 - ESLint updates: Add keys to: IContentsLists, IListInfo , IMyListInfo , IContentsListInfo ESLint updates: Add keys to: ICompareKeysResult, IBaseField in src\Lists\columnTypes.ts Type and add ESLint keys to: HandleBarReplacements : IHandleBarReplacements

@2.1.79 - Update Page Arrows - BigMax: https://github.com/mikezimm/drilldown7/issues/207

@2.1.78 - Update Performance functions for ops and sets keys in IPerformance: (may have missed update to tables.ts) src\Services\Analytics\analytics2.ts, src\Performance\IPerformance.ts Update src\Elements\dialogBox.tsx button style gap: https://github.com/mikezimm/drilldown7/issues/205 Add resetArrows to PageArrows for: https://github.com/mikezimm/drilldown7/issues/198

@2.1.77 - Drilldown SPFx v1.15.2 liniting discoveries/fixes: add [key: string]: string | number | number[] | string[] | undefined; to interfaces in IPerformance.ts and IRefiners.ts Update IPerformance interfaces, functions, tables. Move settings into sub-object sets, operations into ops.

@2.1.76 - create Banner SpecialMessage capabilility in src\HelpPanelOnNPM\special

@2.1.74 - REMOVE old folders: /HelpInfo/ and /HelpBanner/ - use HelpPanelOnNPM

@2.1.73 - FPSPageArrows - update Big Arrows title text to show correct incriment Update Audience Interfaces and PropPane Choices - Now 'what they are' instead of 'what they were used for' expandAudienceChoicesAll : IFPSExpandoAudience >> EveryoneAudienceChoices : IEveryoneAudience beAUserAudienceChoicesAll: ? >> PageEditorAudienceChoices : IPageEditorAudience create function: createAudienceGroup Remove: interface ISPServices in src\Services\SPServices\ISPServices.ts, does not seem to be used anywhere

@2.1.72 - update FetchBanner: fix pinMeIcon styles from being to small with no margin to larger with margin

@2.1.70 - updateBannerThemeStyles to NOT call createBannerStyleStr when choice === custom || choice === lock. Addresses: https://github.com/mikezimm/drilldown7/issues/189 Add includeSiteTheme to FPSBanner3Group && FPSBanner3ThemeGroup include that option in prop pane

@2.1.69 - updated saveAnalytcs2 & saveAnalytcs3 to update AnalyticsVersion properly.

@2.1.68 - updated IPageLayoutType to include 'Home'.

@2.1.67 - Renamed ISupportedHost to IPageLayoutType since that is the acutal property. Supported hosts is the property name in the manifest.json but the values for that do not match up to the PageLayoutType

@2.1.66 - Update FPSPinMe return on host === "SharePointFullPage": https://github.com/mikezimm/drilldown7/issues/186

@2.1.63 - add createItemLink to ICustViewDef (Drilldown) update IMinPerformance, ILoadPerformance, getMinPerformance for getAllProps setting

@2.1.62 - update startPerformOp to include option to show MS in panel, make IPerformanceOp: details required for typing update updatePerformanceEnd to accept count. Then adds op.c (count) and op.a (avg) for analytics update getMinPerformance to accept count. Then adds op.c (count) and op.a (avg) for saving

@2.1.59 - create src\HelpPanelOnNPM\onNpm\adjustCmdThemes.ts. Goal to have easy ways to adjust command themes for main react component adjustCmdStyles - catchall for most customization alvFMCmdStyles - used by alvFM pageInfoCmdStyles - used by PageInfo adjustDefaultCmdMargin - adjusts defaultCmdStyles margin only and used by SS7 adjustDefaultCmdColorMargin - adjusts defaultCmdStyles margin and colors and used by SS7

@2.1.58 - Add optional appendTitle to FetchBanner and WebPartBanner which can be easily added in main react component It used to be modified when all was in the react component but I think this would be better solution Update src\Services\DOM\PinMe\FPSPinMenu.ts to handle when disabled - not apply PinMe style

@2.1.56 - Restructure \PropPane\ReactImageOptions and \PropPane\ReactPivotOptions Created folders \PropPane\ReactImage and \PropPane\ReactPivot Created subfolders in each: \v1 (original values) and \v2 for latest updates Created more interfaces for each in respective Types file in each folder Added types including IHoverEffect

@2.1.54 - Rebuild src\Services\PropPane\ReactImageOptionsV2 and src\Services\PropPane\ReactPivotOptionsV2

^^^^^^^ @2.1.52 started updates for PivotTiles7

@2.1.51 - Add IPageArrowsParentProps to PageArrows conmponent - used for extending parent component props add optional fontSize to props. Defaults to 32px PageArrowsProps: Change slideCount to itemsPerPage

@2.1.47 - move makeToggleJSONCmd src\Elements\ToggleJSONButton and getHighlightedText in src\Elements\HighlightedText

@2.1.46 - check all strings for target.value due to text box changes: src\Services\Strings\stringServices.ts https://github.com/mikezimm/generic-solution/issues/155

  Fix getStringArrayFromString removeEmpty logic:  src\Services\Strings\stringServices.ts
  https://github.com/mikezimm/generic-solution/issues/156

@2.1.45 - Changes, updates from generic-solution Add types to ColoredLine in src\Elements\draw.tsx ; Update openThisLinkInNewTab in src\Links\CreateLinks.tsx - made more robust in case input is an element like text Update buildMLineDiv in src\Services\Strings\formating.tsx create src\Services\Strings\xmlStrings.ts: getXMLObjectFromString, prettyUpXMLStringAsElements create src\zComponents\HoverCard\component.tsx ( buildPropsHoverCard ) and css

@2.1.44 - add { createSpanLink, openThisLinkInNewTab } to '/dist/Links/CreateLinks';

@2.1.41 - Update IMinPerformanceOp to add optional Count and Average if wanted c?: number; //Count a?: number; //Average ms / count

@2.1.40 - add component: src\zComponents\Accordion\Accordion.tsx for Accordion

@2.1.37 - add component: zComponents\Arrows\PageArrows.tsx for Paging

@2.1.36 - add functions to analytics2.ts: getMinPerformanceString and getMinPerformance

@2.1.35 - npm i --save-dev @types/react: Gets rid of all the yellow squigglies on the react import AND all the react component props errors Fix FetchBanner error per https://akashmittal.com/could-not-find-declaration-file-module/ "main": "dist/index.js", "types": "dist/index.d.ts",

@2.1.34 - add more keys ( setting1-10, analyze1-10, process1-10, render1-10, save1-10 ) to ILoadPerformance and IMinPerformance For banner inputs, change bonusHTML to bonusHTML1 and bonusHTML2, add dedicated panelPerformance which will get converted to performance table on render and changes

@2.1.30 - changeed Performance\styles.css file name in 2.1.29 but rolling back change. Not needed.

@2.1.28 - add performance?: any; to IZSentAnalytics create IMinPerformance in src\Performance\IPerformance.ts and related sub types

@2.1.27 - add quickCommandsRequireUser in IQuickCommands for https://github.com/mikezimm/drilldown7/issues/155

@2.1.26 - add superOnInit to ILoadPerformanceOps and LoadPerformanceOps

@2.1.24 - update IWebpartBannerProps in src\HelpPanelOnNPM\onNpm\bannerProps.ts bonusHTML: any; //Intended for extra element to be passed in during reactComponent such as Performance or other info.

@2.1.22 - add to IFPSCoreReactComponentState in src\CoreFPS\ReactComponentProps.ts refreshId: string; // If needed to track/force a refresh of the banner debugMode?: boolean; //Option to display visual ques in app like special color coding and text DeviceBug showSpinner?: boolean; //Optional if you use a spnner to show loading message

@2.1.21 - add keys to ILoadPerformance in src\Performance\IPerformance > fetch6-10 and analyze6-10. update src\HelpPanelOnNPM\banner\onLocal\component.tsx - check for rebuildNearElements on line 263 add refreshId: string to src\HelpPanelOnNPM\onNpm\bannerProps.ts add replacePanelHTML to src\HelpPanelOnNPM\onNpm\FetchBannerElement.tsx props., replace on fly if included add refreshId to WebPartRenderBannerV2 > mainWebPartRenderBannerSetup

@2.1.20 - Add refreshId and optional replacePanelHTML to FetchBanner which can refresh the Performance info in the panel.

@2.1.18 - Add 'jsEval' to types ILoadPerformanceOps and array LoadPerformanceOps in src\Performance\IPerformance.ts.

@2.1.17 - Define types ILoadPerformanceOps and array LoadPerformanceOps in src\Performance\IPerformance.ts. If not provided tables now shows all performance ops

@2.1.16 - require styles on Performance/Tables

@2.1.15 - add keys to ILoadPerformance in src\Performance\IPerformance > add renderWebPartStart, renderWebPartEnd, fetch1-5 and analyze1-5 update src\Performance\functions > add typing, update startPerformOpDetail to check for array structure

@2.1.14 - fix BannerTitle in mainWebPartRenderBannerSetup.

@2.1.13 - create refreshPanelHTML, refreshPanel to be able to refresh panel with new performance stats.

@2.1.11 - Update createPerformanceTableVisitor in src\Performance\tables.tsx - to pass createPerformanceRows( performance, keysToShow )

@2.1.8 - Refactor src\Performance\tables.tsx to include keysToShow instead of hard coded keys to map through createPerformanceRows types update _LinkIsValid to not log an error if the link is not found update getHelpfullError, getHelpfullErrorV2, convertHelpfullError to have new variable: logErrors logErrors defaults to true but can now be turned off as in case of _LinkIsValid where it is just testing to see if a link exists.

@2.1.7 - Reorganize lists/getFunctions > lists/getV1 Create lists/getV2 which is from Drilldown and includes more advanced options like Author/firstName functions Update: PresetFPSBanner showBanner : true, - wasn't enabling ThemeGroup or Basics Group

@2.1.6 - add ICSSChartDD to ICSSCharts.ts

@2.1.5 - Fix importing defaults from HelpPanel/onNpm: https://github.com/mikezimm/CoreFPS114/issues/8

@2.1.3 - Fix expandoOnInit to not check isEdit because I already have the displayMode available Update PresetFPSBanner: expandoDefault : false, expandoAudience : "Everyone", update mainWebPartRenderBannerSetup with logic to turn it off when setting was off

@2.1.2 - Import FetchBanner into src\HelpPanelOnNPM\onNpm\FetchBannerElement.tsx from ALVFinMan

@2.1.1 - Restructure buildBanner add mainWebPartRenderBannerSetup into src\HelpPanelOnNPM\onNpm\WebPartRenderBannerV2.ts ( sample from ALVFinMan ) bring buildBannerProps functionality into mainWebPartRenderBannerSetup ( single function now ) move BannerInterfaces from src\HelpPanelOnNPM\onNpm\BannerSetup.ts into src\HelpPanelOnNPM\onNpm\BannerInterface.ts separate buildBannerProps ( older 2-step process ) from src\HelpPanelOnNPM\onNpm\BannerSetup.ts into src\HelpPanelOnNPM\onNpm\buildBannerPropsV1.ts

@2.0.50 - fix BeAUser functionality: add beAUserAudience: IExpandAudiences to IMinBannerUIProps and changeBannerBasics

@2.0.50 - fix BeAUser functionality: add beAUserAudience: IExpandAudiences to IMinBannerUIProps and changeBannerBasics update buildBannerProps : - remove the beAUser and reference bbs.beAUser prop update buildBannerProps : calculate showBeAUserIcon based on beAUserAudience update PresetFPSBanner : beAUserAudience: "Page Editors", update BannerPropPaneButtonBasics to include enableBeAUser to create prop in pane create FPSBanner4BasicGroup as new property pane group which includes beAUserAudience

@2.0.48 - fix bannerCmdStyle = in updateBannerThemeStyles in src\WebPartFunctions\BannerThemeFunctions.ts: Check for forced props add triggered?: boolean to IPreConfigSettings and IConfigurationProp

@2.0.46 - update visitorPanelInfo to accept loadSummary: JSX.Element | null.

@2.0.45 - Create folder src\Performance with all performance content.

@2.0.44 - update renderCustomStyles - deprecate setThisPageFormatting due to overlap with updateSectionStyles.

@2.0.41 - update renderCustomStyles to remove main webpart 'this' object.

@2.0.40 - replace buildExpandoStyle with getReactCSSFromString; in buildBannerProps, add style errors to bbs.errMessage (aka going to banner title )

@2.0.36 - ESLint error prevention: update updateFpsImportProps, add return value - need to update caller fix error react/self-closing-comp: Empty components are self-closing - '></Icon' with just '/' fix some type missing errors: string[]

@2.0.36 - fix setQuickLaunch per https://github.com/mikezimm/CoreFPS114/issues/2

@2.0.35 - fix setToolbar to remove error in thisWP.urlParameters.tool

@2.0.34 - create IFPSCoreReactComponentProps, IFPSCoreReactComponentState in src\CoreFPS\ReactComponentProps.ts

@2.0.33 - Fix Feedback Email web part name in WebpartBanner: sendFeedback - https://github.com/mikezimm/CoreFPS114/issues/3

@2.0.32 - add 'disabled' option to FPSPinMe Default Pin State in Property Pane add defPinState = 'disabled' to PresetFPSBanner since most web parts are designed to work with Expando but not PinMe

@2.0.31 - add new RepoLinks for gitRepoCoreFPS114Small and gitRepoCoreFPS115Small Move PinMe folder from root to \Services\DOM\PinMe create expandoOnInit in src\Services\DOM\Expando\WebPartOnInit.ts Move FPSExpandoramic, FPSOptionsExpando.ts to src\Services\DOM\Expando\

@2.0.27 - update item.linkText in src\RelatedItems\GetItems.ts ( ) - Fix https://github.com/mikezimm/PageInfo/issues/107 Update analytics2.ts to fix long Urls - Links with Heading params. https://github.com/mikezimm/PageInfo/issues/108

@2.0.26 - add validateDocumentationUrl to src\Links\ValidateLinks.ts add updateFpsImportProps to src\Services\PropPane\ImportFunctions.ts add refreshBannerStylesOnPropChange to src\WebPartFunctions\BannerThemeFunctions.ts

@2.0.25 - add 'disabled' to IPinMeState >> add to all web part forced preconfig props if PinMe is not enabled add function findPropFromSimilarKey to Services/Objects/functions.ts create updateBannerThemeStyles in src\WebPartFunctions\BannerThemeFunctions.ts add class .was-forced to src\PropPaneHelp\PropPanelHelp.css update IMinCustomHelpProps to include: requireDocumentation: boolean, requireContacts: boolean, update PresetFPSBanner to include: requireDocumentation: false, requireContacts: false, improve SitePresetsInfo page styling, and logic update applyPresetCollectionDefaults?

@2.0.24 - Improve SitePresets Add preset.source to IPreConfigSettings and SitePresetsInfo show preset.source and preset.location rows

@2.0.20 - Break IMinWPBannerProps into smaller interfaces IMinWPBannerProps extends ---- vvvvv IMinBannerUIProps, IMinPinMeProps, IMinPandoramicProps, IMinBannerThemeProps, IMinCustomHelpProps, IMinPageStyleProps, IMinBannerUtilityProps, IMinFPSLegacyProps

    Move a change... constants from importProps to BannerSetup to be right next to the refactored interfaces.
    move exportIgnorePropsFPS and importBlockPropsFPS to BannerSetup to be above other change constants

    Rename 'change' constants
    changeVisitor > changeCustomHelp
    changefpsOptions1 > changePageStyle
    changeBannerOther > changeBannerUtility

    Move Services\PropPane\WebPartHistory.* files into WebPartHistory sub folder
    Create getWebPartHistoryOnInit in new OnInit.ts file

@2.0.19 - brought some changeProps into npmFunctions import { changeRelated1, changeRelated2, changePageLinks, } from '@mikezimm/npmfunctions/dist/RelatedItems/IRelatedWebPartProps'; import { changeHeadingStyleProps, } from '@mikezimm/npmfunctions/dist/HeadingCSS/FPSHeadingFunctions'; import { changePinMe, } from '@mikezimm/npmfunctions/dist/HelpPanelOnNPM/onNpm/BannerSetup';

@2.0.18 - Import FPSPageInfo ( 2022-07-x 1.0.1.09? ) Heading Style components, interfaces and functions src\HeadingCSS\FPSHeadingFunctions.ts src\HeadingCSS\FPSHeadings.css src\MainWebPartFunctions\MainWebPartStyleFunctions.ts

    Update \Services\DOM\Tags functions and files
    src\Services\Regex\htmlTags.ts

@2.0.16 - Move IFPSPinMenu, IPinStatus, getDefaultFPSPinState from FPSPageInfo.tsx to FPSPinMenu.ts

@2.0.15 - Move FPSBanner3VisHelpGroup to CoreFPS to be with related code

@2.0.13 - /PropPaneHelp/ApplyPresets.ts - add applyPresetCollectionDefaults @2.0.12 - Move PinMeLocations && FPSPinMePropsGroup to /PinMe with code for function RelatedItems/RelatedItemsPropGroup.ts - add buildRelatedItemsPropsGroup, create IMinRelatedWPProps

@2.0.8 - Services/PropPane/ - add FPSImportPropsGroup Services/PropPane/FPSOptionsGroupPinMe.ts - add PinMeLocations && FPSPinMePropsGroup Services/PropPane/WebPartHistoryFunctions.ts - add updateWebpartHistoryV2

@2.0.7 - Core FPS project add FPSBanner3VisHelpGroup

@2.0.5 - Core FPS project add PinMeHelp to PropPaneHelp Common

@2.0.4 - Core FPS project Create SitePresetsInfo in /PropPaneHelp/FPSCommonOnNpm - Based on Drilldown7 (v1.14) model

@2.0.3 - continue Core FPS project .\HelpPanelOnNPM\onNpm\BannerSetup.ts - Update IMinWPBannerProps to include all FPS Properties

@2.0.2 - begin Core FPS project ./CoreFPS/createAboutRow - used in About.tsx page ./CoreFPS/ReusaableTricks.tsx - used in AllContent - panel ./CoreFPS/VisitorPanelComponent - visitorPanelInfo in panel

@2.0.1 - major upgrade to newer version of @pnp/spfx-controls-react npm uninstall @pnp/spfx-controls-react npm install @pnp/spfx-controls-react --save --save-exact

@1.x.x - See Readme-v1History.md for summary of prior changes.

Updates:

First version update

  1. Update arrayServices to latest TMT7 file... which added 2 new functions
  2. Deleted dist folder
  3. Ran tsc
  4. Manually updated version to 0.0.3
  5. ran npm publish --access=public
  6. Updated my project, tested in hosted browser and it worked!
  7. Just got all kinds of errors when trying to auto npm version

Ran npm version and got errors below:

> @mikezimm/npmfunctions@0.0.4 preversion C:\Users\mike.zimmerman\projects\Git\npmFunctions
> npm run lint


> @mikezimm/npmfunctions@0.0.3 lint C:\Users\mike.zimmerman\projects\Git\npmFunctions
> tslint -p tsconfig.json

module.js:549
    throw err;
    ^

Error: Cannot find module 'typescript'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\mike.zimmerman\projects\Git\npmFunctions\node_modules\tslint\lib\linter.js:23:10)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @mikezimm/npmfunctions@0.0.3 lint: `tslint -p tsconfig.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @mikezimm/npmfunctions@0.0.3 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mike.zimmerman\AppData\Roaming\npm-cache\_logs\2021-01-05T15_30_51_438Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @mikezimm/npmfunctions@0.0.4 preversion: `npm run lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @mikezimm/npmfunctions@0.0.4 preversion script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Original attempts to get my src into dist folder

gulp build //did not work
npm install gulp
gulp build

PS C:\Users\mike.zimmerman\projects\Git\npmFunctions> gulp
ReferenceError: build is not defined
    at Object.<anonymous> (C:\Users\mike.zimmerman\projects\Git\npmFunctions\gulpfile.js:6:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at requireOrImport (C:\Users\mike.zimmerman\AppData\Roaming\nvm\v8.11.0\node_modules\gulp\node_modules\gulp-cli\lib\shared\require-or-import.js:19:11)
    at execute (C:\Users\mike.zimmerman\AppData\Roaming\nvm\v8.11.0\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js:37:3)

finally ran

tsc 

and got

src/arrayServices.ts:41:50 - error TS7006: Parameter 'keyNo' implicitly has an 'any' type.

41 export function stringifyKeyValue( thisOne: any, keyNo, delimiter : string ) {
                                                    ~~~~~

src/arrayServices.ts:78:33 - error TS7006: Parameter 'sourceArray' implicitly has an 'any' type.

78 export function spliceCopyArray(sourceArray, startDel, countDelete, startAddOrigPos, addArray) {
                                   ~~~~~~~~~~~

src/arrayServices.ts:78:46 - error TS7006: Parameter 'startDel' implicitly has an 'any' type.

78 export function spliceCopyArray(sourceArray, startDel, countDelete, startAddOrigPos, addArray) {
                                                ~~~~~~~~

src/arrayServices.ts:78:56 - error TS7006: Parameter 'countDelete' implicitly has an 'any' type.

78 export function spliceCopyArray(sourceArray, startDel, countDelete, startAddOrigPos, addArray) {
                                                          ~~~~~~~~~~~

src/arrayServices.ts:78:69 - error TS7006: Parameter 'startAddOrigPos' implicitly has an 'any' type.

78 export function spliceCopyArray(sourceArray, startDel, countDelete, startAddOrigPos, addArray) {
                                                                       ~~~~~~~~~~~~~~~

src/arrayServices.ts:78:86 - error TS7006: Parameter 'addArray' implicitly has an 'any' type.

78 export function spliceCopyArray(sourceArray, startDel, countDelete, startAddOrigPos, addArray) {
                                                                                        ~~~~~~~~

src/arrayServices.ts:80:9 - error TS7034: Variable 'whole' implicitly has type 'any[]' in some locations where its type cannot be determined.

80     let whole = [];
           ~~~~~

src/arrayServices.ts:86:15 - error TS7005: Variable 'whole' implicitly has an 'any[]' type.

86       whole = whole.concat(addArray);
                 ~~~~~

src/arrayServices.ts:128:40 - error TS7006: Parameter 'sourceArray' implicitly has an 'any' type.

128 export function doesObjectExistInArray(sourceArray, objectProperty : string, propValue, exact : boolean = true ){
                                           ~~~~~~~~~~~

src/arrayServices.ts:128:78 - error TS7006: Parameter 'propValue' implicitly has an 'any' type.

128 export function doesObjectExistInArray(sourceArray, objectProperty : string, propValue, exact : boolean = true ){
                                                                                 ~~~~~~~~~

src/arrayServices.ts:227:25 - error TS7017: Element implicitly has an 'any' type because type '{}' has no index signature.

227                         objectToUpdate[compareKey] = foundTag;
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~

src/arrayServices.ts:481:41 - error TS7006: Parameter 'arr' implicitly has an 'any' type.

481 export function removeItemFromArrayOnce(arr, value) {
                                            ~~~

src/arrayServices.ts:481:46 - error TS7006: Parameter 'value' implicitly has an 'any' type.

481 export function removeItemFromArrayOnce(arr, value) {
                                                 ~~~~~

src/arrayServices.ts:505:40 - error TS7006: Parameter 'arr' implicitly has an 'any' type.

505 export function removeItemFromArrayAll(arr, value) {
                                           ~~~

src/arrayServices.ts:505:45 - error TS7006: Parameter 'value' implicitly has an 'any' type.

505 export function removeItemFromArrayAll(arr, value) {
                                                ~~~~~

Then I fixed all the errors and updated the tsconfig to

{
  "compilerOptions": {
            //"rootDir": ".",
        "outDir": "./dist",
    }
}

Then reran this from the Git\npmFunctions folder in command prompt, and got all files in the dist folder

tsc 

This package produces the following:

  • lib/* - intermediate-stage commonjs build artifacts
  • dist/* - the bundled script, along with other resources
  • deploy/* - all resources which should be uploaded to a CDN.

2022-04-19: Setting up edit on home pc:

npm config set init-author-name "Mike Zimmerman" npm set init-liscense "ISC" npm init --scope=@mikezimm npm install

got errors like this again trying to run tsc PS C:\Users\mike.zimmerman\projects\Git\npmFunctions> gulp ReferenceError: build is not defined at Object. (C:\Users\mike.zimmerman\projects\Git\npmFunctions\gulpfile.js:6:1) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at requireOrImport (C:\Users\mike.zimmerman\AppData\Roaming\nvm\v8.11.0\node_modules\gulp\node_modules\gulp-cli\lib\shared\require-or-import.js:19:11) at execute (C:\Users\mike.zimmerman\AppData\Roaming\nvm\v8.11.0\node_modules\gulp\node_modules\gulp-cli\lib\versioned^4.0.0\index.js:37:3)


npm install @pnp/spfx-controls-react
npm install @types/webpack-env
npm install @types/es6-promise
npm install --save-dev prettier tslint tslint-config-prettier

NOTE: added install prettier and tslint line after trying to update version. Error did not arise when doing inital

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.92
    0
    • latest

Version History

Package Sidebar

Install

npm i @mikezimm/npmfunctions

Weekly Downloads

0

Version

2.1.92

License

ISC

Unpacked Size

3.33 MB

Total Files

899

Last publish

Collaborators

  • mikezimm