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

gatsby-theme-dslemay-core

v0.3.1

Published

Base plugins for a Gatsby site

Downloads

2

Readme

Gatsby Theme dslemay Core

This theme installs some core Gatsby plugins used by many sites. This resolves the problem of installing and updating many packages in each Gatsby project. This package installs and adds the following packages to your gatsby-config.js:

Installation and Usage

To install this theme run the command below.

  • Yarn: yarn add gatsby-theme-dslemay-core
  • NPM: npm i gatsby-theme-dslemay-core

Once installed, your gatsby-config.js will need to be updated to use the theme. This can be done by adding the following code.

// gatsby-config.js
module.exports = {
  __experimentalThemes: [
    {
      resolve: 'gatsby-theme-dslemay-core',
      options: {
        analytics: 'tracking-id' // Object or string
        sitemap: true // Boolean
      }
  ],
  ...
}

Gatsby will then merge the plugins defined in the package's gatsby-config onto yours. As a result, you do not need to install or manually add any of the packages listed above to your project.

Gatsby Source Filesystem

Out of the box, the theme will connect src/data and src/images to GraphQL. The theme will create these folders automatically if they do not exist. Any files beginning with a . in the data folder will be ignored. Since gatsby-source-filesystem is installed as a dependency of the theme, you may also add more folders in your gatsby-config.js without needing to manually install the package separately.

API

This theme exposes several options for configuring its behavior. These can be configured within the options object when theme is resolved as shown in the installation instructions above.

Google analytics

  • Option key: analytics
  • Type: String or Object
  • Default: undefined

If enabled, Gatsby will add Google Analytics tracking configuration to your pages during production builds. It is off by default. The configuration accepts a string or an object to enable Google Analytics tracking. The configuration object accepts all of the keys listed in the Gatsby plugin

  • String: Must be your Google Analytics tracking id. Sets the anonymize option to true.
  • Object: Pass in the same options listed in the plugin docs. Anonymize is defaulted to true, but can be overriden by your configuration object.

Sitemap Generation

  • Option key: sitemap
  • Type: boolean
  • Default: true

If enabled, Gatsby will generate a sitemap for your site during production builds. Note: This requires a siteUrl in your siteMetadata if enabled. Failing to set this property in your gatsby-config.js will result in a build error.

Conditionally added plugins

Gatsby has a number of plugins which may be added dependening on other dependencies you use in your project. For example gatsby-plugin-flow will add the necessary Babel config to strip out flow types, and gatsby-plugin-emotion will handle the Babel presets to use Emotion's css prop without needing to use the JSX pragma at the top of each file. The following plugins will be added automatically if you have the corresponding dependency installed.

The installed column indicates whether the config checks for the package in dependencies, devDependencies or both.

| Dependency | Installed | Version Reqs | Gatsby Plugin | | ------------- | ------------- | ------------ | ------------------------ | | flow-bin | devDependency | | gatsby-plugin-flow | | typescript | devDependency | | gatsby-plugin-typescript | | @emotion/core | dependency | >=10.0.0 | gatsby-plugin-emotion |