@renderforest/media-lib-spa

Seperate component for rendering users Media Library in any Renderforest web app.

Usage no npm install needed!

<script type="module">
  import renderforestMediaLibSpa from 'https://cdn.skypack.dev/@renderforest/media-lib-spa';
</script>

README

Media Library Component

Up and Running

  • npm i
  • npm run dev

publishing npm module

  • Get you NPM_TOKEM from authority,
  • In ~/.profile file append export NPM_TOKEN="00000000-0000-0000-0000-000000000000" (your npm token)
  • source ~/.profile
  • In ~/.npmrc append //registry.npmjs.org/:_authToken=${NPM_TOKEN}
  • npm run publish-module

helpful link: https://blog.npmjs.org/post/118393368555/deploying-with-npm-private-modules

Standalone Mode

For development use npm run start-standalone

In page, render component with these arguments

React.createElement(Comp, {
  mode: "standalone",
  stockAllowed: false,
  isVisible: true
});

For building and publishing to S3, use

  • npm run build-standalone
  • npm run upload-standalone

After upload, change nginx conf of website-front-end to reflect new version of media-lib.

Standalone Mobile Mode

For development use npm run start-mobile-app

For building and publishing to S3, use

  • npm run build-mobile-app
  • npm run upload-mobile-app

After upload, change nginx conf of website-front-end to reflect new version of media-lib.