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

@novemberfiveco/mandrill

v2.1.3

Published

Mandrill

Downloads

97

Readme

Mandrill

This repo is part of Mandrill for Frontend Web & React Native

Getting started

How to publish a new version

  1. Run yarn (To make sure everything is ok)
  2. Update package.json with version number
  3. Run yarn login when needed (Credentials in Lastpass)
  4. Run yarn publish:private
  5. Commit and push (Add tag with version)

1. Set the correct npm Github Registry

If you don't already configured the N5 NPM repository, do so first by running:

npm login --scope=@novemberfiveco --registry=https://npm.pkg.github.com

2. Add Mandrill & Mandrill services to your package.json's dependencies with the correct version

{
  ...
  "dependencies": {
    "mandrill": "@novemberfiveco/mandrill",
    "mandrill-service-google-analytics": "@novemberfiveco/mandrill-service-google-analytics",
    "mandrill-service-firebase": "@novemberfiveco/mandrill-service-firebase",
    "mandrill-service-fabric": "@novemberfiveco/mandrill-service-fabric",
  },
  ...
}
  • https://github.com/novemberfiveco/nove-tool-frontend-mandrill-google-analytics
  • https://github.com/novemberfiveco/nove-tool-frontend-mandrill-firebase-react-native
  • https://github.com/novemberfiveco/nove-tool-frontend-mandrill-fabric-react-native

Run yarn install

3. Generate the Mandrill tracking-code for your specific project

You'll need another monkey 🙈 🙉 🙊 🐵 pygmy, with frontend extensions

  • https://bitbucket.org/appstrakt/apps-tool-pygmy-cli
  • https://bitbucket.org/appstrakt/nove-tool-pygmy-cli-extras-frontend

Run pygmy frontend mandrill init to generate the config yaml

Run pygmy frontend mandrill gen to generate the Mandrill tracking-code

4. Configure Mandrill (for React & React Native apps)

Example for Google Analytics service:

Create an Analytics Provider that registers services to Mandrill

/*
 * AnalyticsProvider.js
 *
 * @flow
 */

import React, { Component } from 'react';
// Import Mandrill (node_module)
import { serviceManager } from 'mandrill';
// Import Google Analytics Mandrill Service (node_module)
import GoogleAnalyticsService from 'mandrill-service-google-analytics';
// Import service configuration from generated tracking code
import { googleanalytics1 } from 'src/mandrillGenerated/config.mandrill';

class AnalyticsProvider extends Component {
  // Lifecycle methods
  componentDidMount() {
    // Create Google Analytics Service
    const { id } = googleanalytics1;
    const googleAnalyticsService = new GoogleAnalyticsService(id);

    // Register Google Analytics Service to Mandrill
    serviceManager.registerService(googleAnalyticsService);
  }

  // Render
  render() {
    return this.props.children;
  }
}

export default AnalyticsProvider;

Wrap this provider around the app

5. Call methods from generated Mandrill tracking-code

// @flow

// Import methods form generated Mandrill tracking-code
import { trackSomethingRandom, trackScreenView, trackButtonPress } from 'src/mandrillGenerated/config.mandrill';

// Call methods form generated Mandrill tracking-code
trackSomethingRandom();

const screenViewName = 'checkout';
trackScreenView(screenViewName);

const buttonName = 'pay-button';
trackButtonPress(buttonName);