1.0.9 • Published 3 years ago

mos-fame-event-module v1.0.9

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
3 years ago

Frame application library

This library is running inside each module. It is used for

  • Communication between frame app and module
  • Synchronize the browsers localization

Usage

To include it in a module, add

Browser

<script async type="module" src="https://frame.prototype.dev-blue.com/lib/dist/browser/MosFrameModule.js"></script>

to your site, then a window.MosFrameModule will be available golobally

React

import mosMod from 'mos-fame-event-module'
mosMod.init() // if it is not already initiated

build

npm run build 
yarn build

A dist folder will be generated with this structure

As you can see we have browser build (for old javascript app, the global MosFrameModule variable will be available under window object)

index.es.js for react app (and any application that uses ES6 import)

we omitted cjs build in this case because we won't be using this module in node environement

Deployment

NPM

a simple npm publish will be enough to publish to npm, make sure to pump the version first

Browser

The library has to be served from a server which has CORS enabled.

Tree shaking

to analyze and visualize the bundle size, we can use the analyzer folder like this:

npm run analyzer-stats // to generate stats.json about our build npm run analyzer // to use the stats.json and generate bundle visualizer in your default browser

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago