0.0.22 • Published 4 years ago

@asfsl/cubu-elements v0.0.22

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

cubu Elements

Serve Locally

$ npm start

Local testing pages:

http://localhost:3333/pages/service-button

http://localhost:3333/pages/service-panel?serviceId=e1cc4e1b-1454-474c-af07-1b0d520e66fd&lang=he

http://localhost:3333/pages/queue-info?serviceId=e1cc4e1b-1454-474c-af07-1b0d520e66fd&lang=he

Deploy to NPM

  1. Log in to NPM (npm login)

  2. Update the package version number in package.json

  3. Build the package (npm run build)

  4. Publish to NPM (npm publish --access public)

Using the package in an HTML page

  1. Add the script tag:

    <script
      type="module"
      src="https://unpkg.com/@asfsl/cubu-elements/dist/cubu/cubu.esm.js"
    ></script>
    <script
      nomodule=""
      src="https://unpkg.com/@asfsl/cubu-elements/dist/cubu/cubu.js"
    ></script>
  2. Add the cubu element tag in the HTML page

Overriding Firebase configuration

If you want the elements to connect to different environments (other than Prod), you must override the Firebase configuration. This is done by setting the global variable __cubu_config__ on the page hosting the element.

For example, to use the Dev environment, put the following script in the page section:

<script type="text/javascript">
  window.__cubu_config__ = {
    apiKey: 'AIzaSyBndsCXxIsI5T5CYJDmpUtgXUoefmrICQw',
    authDomain: 'cubu-dev-161b0.firebaseapp.com',
    databaseURL: 'https://cubu-dev-161b0.firebaseio.com',
    projectId: 'cubu-dev-161b0',
    storageBucket: 'cubu-dev-161b0.appspot.com',
    messagingSenderId: '1029635667820',
    appId: '1:1029635667820:web:4386f4f25b7bdddb326549',
    measurementId: 'G-CFRWPD6V74',
  };
</script>

Resources:

0.0.22

4 years ago

0.0.21

4 years ago

0.0.19

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago