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

magpie-base

v3.6.8

Published

Provides base components for magpie frontend projects

Downloads

132

Readme

magpie-base

Base components in Vue for magpie-powered experiments.

Installation

First, ensure you have Node.js v16 or v18 installed.

To install this package, run npm install -g magpie-base.

To initialize a new experiment based on magpie (after installing the package), run magpie new experiment-name.

For more information, please visit the project homepage

Documentation

The API reference for the latest version is available at reference.magpie-experiments.org.

A guided introduction to building experiments with magpie is available at magpie-experiments.org.

How to update existing projects

$ cd your-project
$ npm update magpie-base

Read more on maintaining npm dependencies.

Core Development

Git branching model

The master branch represents the latest release. Development of new features and pull requests happen on the develop branch.

Release procedure

If a release should be done

  1. Review changes and determine new version number according to Semantic versioning
  2. Document new release in CHANGELOG.md file
  3. Bump package.json:version
  4. Commit and tag vX.X.X
  5. Merge into master
  6. Wait for CI to complete and pass
  7. npm publish
  8. Upgrade magpie in project repositories of this Github Organization

Development principles

  • Components should not expose CSS classes for manipulation but instead offer customization either via unstyled slots or via props.
  • Pre-packaged screens are more of a convenience should be rather easy to replicate with normal userland code
  • Always use camelCase for measurements

Linting

Before committing changes it is recommended to run the linter to make sure the changes adhere to the general coding style.

Run the js/vue linter using

npm run lint:fix

and the css linter using

npm run stylelint:fix

Tests

Ideally every feature should be covered by at least one unit test. Unit tests are run on every commit and pull requests, so we can quickly detect whenever a change breaks something.

Run the unit tests using

npm run test:unit

For implementing tests we're using the jest framework in combination with vue test utils.

Docs

In order to spin up a local web server with the docs run npm run docs.

In order to build the docs run npm run docs:build.

The contents and organization of the docs are declared in styleguide.config.js. Each source folder should have a docs.md file with a general introduction to the feature in said folder.

The online docs are automatically built from the latest commit of the master branch.

Vue components

All Vue components must be exported in src/components/index.js in order to be available in downstream projects without importing them.