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

ross-mvecom-fe-common

v0.2.0

Published

Common library

Downloads

1

Readme

ROSS-MVECOM-FE-COMMON

Working locally

To test the library in your application without first publishing it you need to create a symlink from the library to your application. This is done by doing the following steps:

Step 1

Compile the library by running the following command

npm run compile

Or, if you want the changes to hot-compile, you can run the compile script with a watcher

npm run compile:watch

Step 2

Navigate to the dist that can be found inside the root directory

cd dist

From where here you need to prepare the symlink by running

npm link

Step 3

Navigate to your application from where you have your node_modules folder and run this command

npm link @mvecom/common

You should now be good to go! If you run the compile command with the :watch suffix you'll automatically get the changes done inside the library inside your application.

Manually publishing

In order to manually publish you'll need to do the following steps.

Step 1

Make sure the library is compiled with the latest changes.

npm run compile

Step 2

Create a .npmrc file inside the dist directory and add the following information.

registry=https://interikea.jfrog.io/artifactory/api/npm/mvecom-fe-common/
_auth=<needs to be fetched>
always-auth=true
email=<your email address to JFrog>

Step 3

Fetch credentials for .npmrc by first making sure that you have an account to the JFrog instance, and then navigating into your profile from which you can create an API-key.

Once you've created an API-key you should be able to get the missing credentials by running the following command.

curl -u <JFrog email address>:<API-key> https://interikea.jfrog.io/artifactory/api/npm/auth/

Step 4

Once you've added the missing credentials you need to update the package.json file inside the dist directory to have a higher version than before. You also need to update the CHANGELOG.md to contain the latest version and what has been done.

Once this is done you should be able to publish by running the following command.

npm publish

Installing the common library

Get the credentials from knowit.1passwword (@mvecom/common - Authentication) and add it to your .npmrc.

Then add the common library to your application.

npm i @mvecom/common

Developing components

Skapa dependencies

The common library should not include the components from Skapa. Instead they should be added as peer dependencies when needed. This is because the applications have different ways of instantiating the components and then it's better to let the consumer of the library to have full control of the Skapa dependencies.

Storybook

To browse the componenta and make it easier to develop a component, we have a storybook setup under the /storybook directory.

npm run storybook

If you need more information on how to write stories, here's a good introduction to that, https://storybook.js.org/docs/react/writing-stories/introduction