0.1.5 • Published 1 year ago

expand-react-bridge v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

expand-react-bridge

A tsdx-driven React component library that can be published to NPM. Created to transition ExpandShare from Angular to React.

React Tranistion Diagram

NPM


Usage

Installation

npm install expand-react-bridge @bubblydoo/angular-react
import { AngularReactModule } from '@bubblydoo/angular-react'

@NgModule({
  ...,
  imports: [
    ...,
    AngularReactModule
  ]
})

Example

import { ExampleComponent } from 'expand-react-bridge';

@Component({
  template: `<react-wrapper [component]="ExampleComponent" [props]="{ children: 'Hello world!' }">`,
})
class AppComponent {
  ExampleComponent = ExampleComponent;
}

Development

src - stores components, services, state mgmt, etc. The contents of this folder are built and packaged to NPM.

example - contains a Parcel React app that can be used to render and test the package locally.

dist - contains build output

Installation

Run tsdx:

git clone https://github.com/repo...
cd expand-react-bridge
npm start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

One-off build:

npm run build

Using Parcel Example

The playground is a simple Parcel app. It can be used in development to simulate the eventual React app. I want to replace Parcel with Create React App since that'll be the final library (Parcel came with tsdx).

Run example in another terminal:

cd example
npm install
npm start

Imports and live reloads /dist.

Bundle analysis

Calculate and visualize real cost of library using size-limit:

npm run size
npm run analyze

Publishing to NPM

Upgrade the version field in package.json, then run publish.

npm publish
abbrevababacorn-walkacorn-jsxacornagentkeepaliveacorn-globalsajvagent-baseaggregate-erroransi-colorsansi-escapesaprobaansi-regexanymatchansi-stylesare-we-there-yetargparsearr-flattenaria-queryarr-diffarray-includesarr-unionarray-equalarray-unionarray-uniquearrifyarray.prototype.flatarray.prototype.flatmaparray.prototype.tosortedasn1assert-plusastral-regexassign-symbolsast-types-flowasynckitasync-foreachasyncroatobat-least-nodeavailable-typed-arraysaws4aws-sign2axe-coreaxobject-querybabel-eslintbabel-plugin-istanbulbabel-plugin-jest-hoistbabel-jestbabel-plugin-macrosbabel-plugin-dev-expressionbabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-transform-rename-importbabel-plugin-polyfill-regeneratorbabel-preset-jestbabel-preset-current-node-syntaxbabel-plugin-annotate-pure-callsbasebalanced-matchbcrypt-pbkdfboolbasebinary-extensionsbrace-expansionbrowser-process-hrtimebracesbrowser-resolvebs-loggerbrowserslistbuiltin-modulesbuffer-frombsercacachebytes-ieccache-basecallsitescall-bindcamelcasecaniuse-apicapture-exitcaniuse-litecaselesschardetchalkchownrchokidarcamelcase-keysclass-utilsci-infoclean-stackcli-spinnerscli-widthcliuicli-cursorcocollection-visitcollect-v8-coveragecolor-convertcolor-nameclonecombined-streamcolordcomponent-emittercommondircommanderconcat-mapconcat-with-sourcemapscolor-supportconfusing-browser-globalsconsole-control-stringsconvert-source-mapcopy-descriptorcore-js-compatcosmiconfigcore-util-iscss-declaration-sortercross-spawncss-selectcss-whatcssnano-preset-defaultcssocssesccss-treecssnano-utilscssstylecssomdamerau-levenshteindashdashcsstypedata-urlsdebugdecamelize-keysdeep-equaldecamelizedecode-uri-componentdeepmergedeep-isdefaultsdelayed-streamdelegatesdepddefine-propertydetect-newlinediff-sequencesdoctrinedir-globdomexceptiondefine-propertiesdomelementtypedom-serializerdomhandlerdomutilsemoji-regexecc-jsbnelectron-to-chromiumenquirerencodingend-of-streamerr-codeenv-pathses-abstracterror-exentitieses-get-iteratores-set-tostringtages-shim-unscopablesesbuildes-to-primitiveescape-string-regexpescaladeeslinteslint-config-prettiereslint-config-react-appescodegeneslint-import-resolver-nodeeslint-module-utilseslint-plugin-flowtypeeslint-plugin-jsx-a11yeslint-plugin-prettiereslint-plugin-react-hookseslint-plugin-importeslint-plugin-reacteslint-scopeeslint-utilseslint-visitor-keysespreeesprimaesqueryesrecurseestraverseestree-walkeresutilsexpand-bracketsextendexpectexec-shextend-shallowexternal-editorextglobextsprintffast-deep-equaleventemitter3execafast-difffast-globfast-levenshteinfastqfb-watchmanfiguresfill-rangefile-entry-cacheexitfind-upflat-cachefast-json-stable-stringifyflattedfor-inforever-agentfor-eachfind-cache-dirform-datafraction.jsfragment-cachefs.realpathfs-minipassfs-extrafunction-bindfunction.prototype.namefunctional-red-black-treefunctions-have-namesgensyncgaugeget-caller-filegeneric-namesget-intrinsicget-package-typegazeget-stdinget-symbol-descriptionget-valueget-streamglobglob-parentgetpassglobalsglobalyzerglobalthisglobbyglobrexglobulegopdgrowlyhar-schemahar-validatorhashard-rejectionhas-bigintshas-flaghas-property-descriptorshas-protohas-symbolsgraceful-fshas-tostringtaghas-unicodehas-valuehas-valueshosted-git-infohtml-encoding-snifferhtml-escaperhttp-cache-semanticshttp-proxy-agenthttp-signaturehumanize-durationhuman-signalshttps-proxy-agenthumanize-msiconv-liteicss-utilsignoreimport-cwdimport-freshimport-fromimport-localimurmurhashicss-replace-symbolsindent-stringinfer-ownerinflightinternal-slotinquirerinterpretinheritsipip-regexis-accessor-descriptoris-argumentsis-arrayishis-array-bufferis-binary-pathis-bigintis-bufferis-callableis-boolean-objectis-ciis-data-descriptoris-core-moduleis-dockeris-date-objectis-descriptoris-extglobis-extendableis-fullwidth-code-pointis-generator-fnis-globis-interactiveis-moduleis-mapis-lambdais-number-objectis-negative-zerois-setis-numberis-plain-objectis-referenceis-shared-array-bufferis-streamis-symbolis-stringis-plain-objis-typedarrayis-typed-arrayis-weakmapis-regexis-weakrefis-weaksetisarrayis-windowsis-wslisexeisstreamisobjectistanbul-lib-coverageistanbul-lib-instrumentistanbul-lib-source-mapsistanbul-lib-reportistanbul-reportsjestjest-clijest-configjest-diffjest-docblockjest-eachjest-changed-filesjest-environment-jsdomjest-get-typejest-environment-nodejest-jasmine2jest-leak-detectorjest-message-utiljest-matcher-utilsjest-pnp-resolverjest-mockjest-regex-utiljest-resolvejest-resolve-dependenciesjest-haste-mapjest-runtimejest-runnerjest-serializerjest-utiljest-validatejest-watch-typeaheadjest-watcherjpjsjest-workerjest-snapshotjs-base64js-tokensjsbnjsdomjsescjson-parse-even-better-errorsjson-schemajson-schema-traversejson-stable-stringify-without-jsonifyjson-stringify-safejs-yamljsonfilejson5jsprimjsx-ast-utilskind-ofkleurlanguage-tagslanguage-subtag-registrylevenlilconfiglevnlines-and-columnsloader-utilslocate-pathlodash.mergelodash.memoizelodash.sortbylog-symbolslodash.uniqlodash.camelcaselog-updatelodashlolexloose-envifylower-caselodash.debouncemake-fetch-happenmake-errormakeerrormap-cachemap-objmake-dirmap-visitmdn-datalru-cachemeowmerge-streammagic-stringmerge2micromatchmime-typesmime-dbmimic-fnminimistmin-indentminimatchminimist-optionsminipass-collectminipass-fetchminipassminipass-flushminipass-pipelineminizlibminipass-sizedmixin-deepmkdirpmsmute-streammrinannanomatchnanoidnatural-comparenegotiatornice-trynode-gypno-casenode-int64nanospinnernode-notifiernode-releasesnoptnormalize-package-datanormalize-pathnormalize-rangenormalize-urlnpmlognth-checknwsapioauth-signobject-assignobject-copyobject-inspectobject-isobject-keysobject-visitobject.entriesobject.assignobject.fromentriesobject.hasownobject.pickobject.valuesonceonetimeoptionatororaos-tmpdirp-each-seriesp-finallyp-limitp-locatep-mapp-queuenpm-run-pathp-timeoutp-tryparse5parse-jsonparent-modulepascalcasepascal-casepath-existspath-keypath-is-absolutepath-parseperformance-nowpath-typepicocolorspnpicomatchposix-character-classespiratespostcss-calcpostcss-colorminpifypostcss-convert-valuespostcss-discard-commentspkg-dirpostcss-discard-duplicatespostcss-discard-emptypostcss-load-configpostcss-discard-overriddenpostcss-merge-rulespostcss-minify-font-valuespostcss-merge-longhandpostcss-minify-gradientspostcss-minify-selectorspostcss-minify-paramspostcss-modules-extract-importspostcss-modulespostcss-modules-local-by-defaultpostcss-modules-scopepostcss-modules-valuespostcss-normalize-charsetpostcss-normalize-stringpostcss-normalize-display-valuespostcss-normalize-positionspostcss-normalize-timing-functionspostcss-normalize-repeat-stylepostcss-normalize-unicodepostcss-normalize-whitespacepostcss-normalize-urlpostcss-ordered-valuespostcss-selector-parserpostcss-reduce-initialpostcss-reduce-transformspostcss-svgopostcss-unique-selectorspostcss-value-parserprettierprelude-lsprocess-nextick-argsprettier-linter-helperspretty-formatprogress-estimatorprogresspromise-inflightpromptspromise-retrypromise.seriespumppslprop-typesqspunycoderandombytesqueue-microtaskquick-lrureact-isread-pkgread-pkg-uprealpath-nativereadable-streamreaddirpregeneraterechoirredentregenerator-transformregenerate-unicode-propertiesregenerator-runtimeregexp.prototype.flagsregex-notregexppregjsparserregjsgenregexpu-corerepeat-elementremove-trailing-separatorrepeat-stringrequest-promise-corerequestrequest-promise-nativerequire-main-filenamerequire-directoryresolveresolve-fromresolve-cwdresolve-urlretrestore-cursorrimrafretryrollup-plugin-sourcemapsrollup-plugin-typescript2rollup-plugin-terserrollup-pluginutilsrsvprolluprun-asyncreusifyrun-parallelsafe-identifiersafe-regexrxjssafer-buffersafe-regex-testsadesaxessanesass-graphsafe-bufferschedulerscss-tokenizerset-valueserialize-javascriptsemvershebang-commandset-blockingshellwordsshebang-regexshelljsside-channelsignal-exitsisteransismart-bufferslashslice-ansisnapdragon-nodesnapdragon-utilsnapdragonsource-mapsocks-proxy-agentsockssource-map-jssource-map-resolvesource-map-supportsource-map-urlsourcemap-codecsplit-stringspdx-expression-parsespdx-exceptionsspdx-license-idsspdx-correctstablessrisprintf-jsstack-utilssshpkstdout-streamstop-iteration-iteratorstatic-extendstring-hashstring-widthstring-lengthstealthy-requirestring.prototype.matchallstring.prototype.trimendstring.prototype.trimstartstrip-eofstrip-bomstrip-ansistring_decoderstrip-final-newlinestrip-indentstyle-injectstrip-json-commentsstylehackssupports-colorsupports-hyperlinkssupports-preserve-symlinks-flagsvg-parsertarsvgotablesymbol-treeterminal-linktersertext-tablethroattest-excludeto-object-paththroughtmptiny-globto-regexto-regex-rangetrue-case-pathtough-cookietmpltrim-newlinestr46tsconfig-pathsto-fast-propertiestunnel-agenttype-festtype-checktsutilstype-detecttweetnacltyped-array-lengthtypedarray-to-bufferunicode-match-property-value-ecmascriptunbox-primitiveunion-valueunicode-match-property-ecmascriptunicode-canonical-property-names-ecmascriptunicode-property-aliases-ecmascriptunique-filenameupdate-browserslist-dbunique-slugunset-valueuniversalifyurixuri-jsutil-deprecateuuidusev8-compile-cachev8-to-istanbulverrorvalidate-npm-package-licensew3c-hr-timew3c-xmlserializerwcwidthwalkerwhatwg-mimetypewhatwg-urlwhatwg-encodingwebidl-conversionswhichwhich-boxed-primitivewhich-modulewhich-collectionword-wrapwhich-typed-arraywide-alignwrappywrite-file-atomicwrap-ansiwritexmlcharswsyamlxml-name-validatory18nyargsyallistyargs-parser
0.1.5

1 year ago