1.0.26 • Published 5 years ago

cadena100-radioplayer v1.0.26

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

Radio-player

List of news and tops from the home service of the sites: cadena 100, rockfm, megastar. This project is shared with this sites as a standalone project.

It is a server side html with styled component.

The URLs to access are:

Host project

Folder structure in host project

The files are inside src/client:

radio-player/
    /application
        /components
            /radio-player-wrapper
                radio-player-wrapper.jsx
        application.jsx 
    /config
        assets.js
        menu.js
        radio-player-data.js
        tops.js
    /server
        requests.js
    /styles
        colors.js
        fonts.js
        theme.js
    /utils
        parser-url.js
    app.jsx
    index.html
                            

Import radio-player in host project

You need to import in the radio-player-wrapper.jsx file.

import RadioPlayer from 'cadena100-radioplayer';

Example:

import React from 'react';
import RadioPlayer from 'cadena100-radioplayer';
import Ad from '@Common/components/containers/advert/components/ad';
import { mediaIcons, DefaultImage } from '../../../config/assets';
import { cad100Theme } from '../../../styles/theme';

const RadioPlayerWrapper = ({
  tops,
  newsList,
  menu,
  ads,
}) => (<RadioPlayer
  tops={tops}
  newsList={newsList}
  menu={menu}
  renderAd={() => ads && <Ad id="left" ads={ads} />}
  theme={cad100Theme}
  logo={DefaultImage}
  mediaIcons={mediaIcons}
/>);

export default RadioPlayerWrapper;

RadioPlayer need a list of props to work. This props are filled fetching request in the host project. RadioPlayer app only shows the components finished.

Also, we will pass the theme, logo, and media icons.

Radio Player Development

We will use styleguidist to show the style of the components.

npm run start-styleguide

Go to localhost:6060.

You will se the styleguidedist page to see the final style.

Radio Player Production

Firstly we need to compile de code:

npm run build-pro

Compile the code to be served in dist/index.js

After we publish to npm.

Publish to npm

This npm module is private. The file: .npmrc has the token to send to the correct way.

//registry.npmjs.org/:_authToken=545ae8be-4ff9-4ded-935e-45e59826ddd1
  • Change the version: Go to package.json and increase the version

  • Create dist/index.js bundle file.

    npm run build-pro
  • Publish

    npm publish

In the host project, you need to increase the version in the package.json and exec npm install.

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago