npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@scbd/idb-views

v1.0.12

Published

Vue component to produce different views for the https://www.cbd.int/biodiversity-day

Downloads

613

Readme

idb-views

Vue component to produce different views for the https://www.cbd.int/biodiversity-day

dev

Runs the code base locally in development. To run on of the different views change the view param in src/main.js. index.html in the root is the entry file for the server.

[ 'IdbMessages', 'IdbMessagesAdmin','IdbActions', 'IdbActionsAdmin', 'IdbMessagesCommunity', 'IdbActionsCountries' ]

preview

Runs the code base after being built but not as a self embedded component. Preview uses public/preview/index.html as the entry point template. However, points directly to dist/dev/es/preview/index.html and uses dist/dev/es/ as the server root.

Change the view param on the fly in dist/dev/es/preview/index.html

preview-widget

Runs the code base after being built and using the one line self embedding component. Preview-widget uses public/preview/widget/index.html as the entry point template. However, points directly to dist/dev/es/preview/widget/index.html and uses dist/dev/es/ as the server root.

Change the view param on the fly in dist/dev/es/preview/widget/index.html

release-dev-s3

  1. build
  2. Replace reference to self in dist/import-map.json to s3 location. '@scbd/idb-views': 'https://scbd-components.s3.amazonaws.com/%40scbd/idb-views%40${version}/dist/widget/index.js'
  3. In src/widget.js pass cdnUrl to WidgetBuilder

Test the widget released on dev

<script 
      type = "module"
      src  = "https://scbd-components.s3.amazonaws.com/%40scbd/idb-views%400.0.2-alpha/dist/widget/index.js?d"
      options = "{ 
                    debug      : true,
                    baseApiUrl : 'https://api.cbddev.xyz/api',
                    accountsUrl: 'https://accounts.cbddev.xyz',
                    year       : 2023,
                    view       : 'IdbActionsAdmin',
                    editUrl    : 'https://rjh.bioland.cbddev.xyz/idb-message'
                  }"> 
</script>

release

Release directly to npm for prod. This need to be removed for ci release on pr.

clean-reinstall

deletes all node_modules and reinstalls all dependencies fresh.

view options

{ 
  // required by all

    view        : '', // oneOf: [ 'IdbMessages', 'IdbMessagesAdmin','IdbActions', 'IdbActionsAdmin', 'IdbMessagesCommunity', 'IdbActionsCountries' ]
    baseApiUrl  : 'https://api.cbd.int/api',
    accountsUrl : 'https://accounts.cbd.int',
    editUrl     : '', // url that homes edit form component for message or action
    year        : '', // year of the IDB

  // required by all
  
  // required by views: ['IdbMessages','IdbMessagesCommunity']

    order       : [], // defines which types in what order are displayed on IdbMessages and what types not displayed on IdbMessagesCommunity

  // required by views: ['IdbMessages','IdbMessagesCommunity']

  // required by views: ['IdbActionsCountries']

    countryBaseUrl:'https://rjh.bioland.cbddev.xyz/biodiversity-day/celebrations', the base url that will end with a country code https://rjh.bioland.cbddev.xyz/biodiversity-day/celebrations/ca

  // required by views: ['IdbActionsCountries']

  // required by views: ['IdbActions']

  country     : '', // specifies current country to display

  // required by views: ['IdbActions']

  debug       : false
}