Skip to content

mikkelricky/display-react

 
 

Repository files navigation

OS2ConTicki display

Description

A react frontend that display conference-data.

Installation

Add the package:

yarn add @os2conticki/display-react

Use it:

<link ref="stylesheet" href="node_modules/@os2conticki/display-react/public/dist/entry.css"></script><script src="node_modules/@os2conticki/display-react/public/dist/entry.js"></script>

Or get it directly from a cdn:

<link ref="stylesheet" href="https://cdn.jsdelivr.net/npm/@os2conticki/display-react@latest/public/dist/entry.css"></script><script src="https://cdn.jsdelivr.net/npm/@os2conticki/display-react@latest/public/dist/entry.js"></script>

Example

<!doctype html>
<html lang="da">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>My conference</title>
    <link ref="stylesheet" href="https://cdn.jsdelivr.net/npm/@os2conticki/display-react@latest/public/dist/entry.css"></script>
  </head>
  <body>
    <div id="app"></div>

    <!-- Load polyfills for IE11 (!) (cf. https://stackoverflow.com/a/29988202) -->
    <script>
      if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
        document.write('<script src="https://cdn.jsdelivr.net/npm/@os2conticki/display-react@latest/public/dist/ie11.js"></script>')
      }
    </script>
    <script src="https://cdn.jsdelivr.net/npm/@os2conticki/display-react@latest/public/dist/entry.js"></script>
    <script>
     ConferenceApp.render({
       element: document.getElementById('app'),
       basename: '/my-conference',
       // Url to conference api.
       url: '…'
     })
    </script>
  </body>
</html>

Development

yarn install
yarn dev-server

Building

yarn install
yarn build

Publishing to npmjs.com

npm adduser os2conticki
npm version «some version»
npm publish --access public
git push --tags

Code linting

When PRs are created towards the develop branch all coding styles are checked by Github Actions.

To check for coding standards, run the following:

yarn coding-standards-check

To automatically apply coding standards, run:

yarn coding-standards-apply`

Something about test-data

About

Conference app implemented in React

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 92.0%
  • HTML 4.3%
  • SCSS 3.0%
  • Other 0.7%