3.2.0 • Published 2 months ago

gatsby-core-utils v3.2.0

Weekly downloads
729,276
License
MIT
Repository
github
Last release
2 months ago

gatsby-core-utils

A list of utilities used in multiple gatsby packages.

Usage

npm install --save gatsby-core-utils

createContentDigest

Encrypts an input using md5 hash of hexadecimal digest.

const { createContentDigest } = require("gatsby-core-utils")

const options = {
  key: "value",
  foo: "bar",
}

const digest = createContentDigest(options)
// ...

cpuCoreCount

Calculate the number of CPU cores on the current machine

This function can be controlled by an env variable GATSBY_CPU_COUNT setting the first argument to true.

valuedescription
Counts amount of real cores by running a shell command
logical-coresrequire("os").cpus() to count all virtual cores
any numberSets cpu count to that specific number
const { cpuCoreCount } = require("gatsby-core-utils")

const coreCount = cpuCoreCount(false)
// ...
const { cpuCoreCount } = require("gatsby-core-utils")
process.env.GATSBY_CPU_COUNT = "logical-cores"

const coreCount = cpuCoreCount()
// ...

joinPath

A utility that joins paths with a / on windows and unix-type platforms. This can also be used for URL concatenation.

const { joinPath } = require("gatsby-core-utils")

const BASEPATH = "/mybase/"
const pathname = "./gatsby/is/awesome"
const url = joinPath(BASEPATH, pathname)
// ...
gatsby-source-filesystem-frontmatter@studiobear/gatsby-theme-blog-ionicgatsby-plugin-wirehead-tree@stvad/gatsby-theme-garden@kennethwangdotdev/gatsby-theme-dotdev@yozora/gatsby-imagesbabel-preset-gatsbyruairi-testbabel-plugin-remove-graphql-queriesforemark-gatsby-layoutforemark-gatsby-transformergatsbygatsby-plugin-sharpgatsby-plugin-sharp-esgatsby-plugin-sharp-ggatgatsby-plugin-sharp-no-original-in-srcsetgatsby-source-contentfulgatsby-source-datocmsgatsby-source-filesystemgatsby-source-filesystem-got8gatsby-theme-wirehead-treegatsby-theme-wtfgatsby-transformer-orgagatsby-transformer-inline-svggatsby-plugin-gatsby-cloudgatsby-plugin-ffmpeggatsby-plugin-functionsgatsby-source-flotiqgatsby-theme-gardengatsby-theme-gardenxgatsby-theme-gatsbyjs-websitegatsby-theme-lona-docsgatsby-build-newrelicgatsby-cligatsby-page-utilsgatsby-philipps-foam-themegatsby-recipesgatsby-remark-imagesgatsby-remark-images-esgatsby-remark-images-externalgatsby-source-shopifygatsby-source-shopify-experimentalgatsby-source-takeshapegatsby-source-ttlivegatsby-source-wordpress-experimentalgatsby-source-wpgraphql-imagesgatsby-source-wordpressgatsby-theme-notesgatsby-theme-orga-posts-coregatsby-theme-papergatsby-theme-monomergatsby-theme-simple-bloggatsby-theme-stack-docsgatsby-theme-stack-systemgatsby-theme-system-docsgatsby-plugin-benchmark-reportinggatsby-source-medusagatsby-source-graphcmsgatsby-source-graphqlgatsby-source-mathdroid-covid19gatsby-theme-code-notesgatsby-theme-dotdevgatsby-theme-changeloggatsby-theme-curiousitygamelynx-gatsbygatsby-plugin-imagegatsby-plugin-manifestgatsby-plugin-mdxgatsby-plugin-preload-fontsgatsby-plugin-offlinegatsby-plugin-offline-nextgatsby-plugin-orgagatsby-plugin-newrelic-testgatsby-plugin-netlifygatsby-plugin-netlify-admingatsby-plugin-page-creatorgatsby-remark-images-remotegatsby-remark-obsidiangatsby-telemetrygatsby-theme-blog-coregatsby-transformer-videogatsby-transformer-remarkgatsby-transformer-remark-rehypegatsby-transformer-remote-filesystemgautham20-gatsby-plugin-sharperxes-telemetry@arcblock/gatsby-transformer-remark@ascorbic/create-test@ascorbic/gatsby-plugin-netlify@alicloud/gatsby-plugin-mdx-fork@bolt-app/babel-preset-gatsby@bonobolabs/gatsby@bongnv/gatsby-transformer-remark@d3vd/gatsby-theme-code-notes@cs125/gatsby-source-filesystem-frontmatter@guanghechen/gatsby-yozora-images@gromy/gatsby-plugin-image@clue/gatsby-source-contentful@gautham20/gatsby-plugin-sharp@gatsbyjs/gatsby-theme-website
3.2.0

2 months ago

3.1.3

2 months ago

3.1.2

2 months ago

3.1.1

2 months ago

3.2.0-next.1

2 months ago

3.2.0-next.2

2 months ago

3.3.0-next.0

2 months ago

3.3.0-next.1

2 months ago

3.1.0

3 months ago

3.2.0-next.0

3 months ago

3.1.0-next.0

3 months ago

3.0.0

3 months ago

3.0.0-zz-next.2

4 months ago

3.0.0-zz-next.3

3 months ago

2.14.0

4 months ago

3.0.0-next.2

4 months ago

3.0.0-zz-next.0

4 months ago

3.0.0-zz-next.1

4 months ago

3.0.0-next.1

4 months ago

3.0.0-next.0

4 months ago

2.14.0-next.2

4 months ago

2.14.0-next.1

5 months ago

2.13.0

5 months ago

2.13.0-next.2

5 months ago

2.14.0-next.0

5 months ago

2.13.0-next.1

5 months ago

2.12.0

5 months ago

2.13.0-next.0

5 months ago

2.12.0-next.3

5 months ago

2.12.0-next.2

6 months ago

2.12.0-next.1

6 months ago

2.11.0

6 months ago

2.12.0-next.0

6 months ago

2.10.0

6 months ago

2.11.0-next.0

6 months ago

2.10.0-next.1

7 months ago

2.9.0

7 months ago

2.10.0-next.0

7 months ago

2.8.0

7 months ago

2.9.0-next.0

7 months ago

2.7.0

8 months ago

2.7.1

7 months ago

2.6.0

8 months ago

2.7.0-next.1

8 months ago

2.7.0-next.2

8 months ago

2.8.0-next.1

7 months ago

2.8.0-next.0

8 months ago

2.4.0

9 months ago

2.6.0-next.0

9 months ago

2.4.0-next.3

9 months ago

2.5.0-next.0

9 months ago

2.7.0-next.0

8 months ago

2.5.0

8 months ago

2.4.0-next.1

9 months ago

2.3.0

9 months ago

2.4.0-next.0

10 months ago

2.3.0-next.1

10 months ago

2.2.0

10 months ago

2.3.0-next.0

10 months ago

2.1.0

10 months ago

2.2.0-next.0

10 months ago

2.0.0

11 months ago

2.1.0-next.1

11 months ago

2.1.0-next.0

11 months ago

2.0.0-v3rc.0

11 months ago

2.0.0-next.2

11 months ago

1.10.1

11 months ago

2.0.0-next.1

11 months ago

2.0.0-next.0

12 months ago

1.10.0

12 months ago

1.11.0-next.0

12 months ago

1.9.0

12 months ago

1.10.0-next.0

1 year ago

1.8.0

1 year ago

1.9.0-next.0

1 year ago

1.8.0-next.1

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.8.0-next.0

1 year ago

1.6.0

1 year ago

1.7.0-next.0

1 year ago

1.5.0

1 year ago

1.6.0-next.0

1 year ago

1.4.0

1 year ago

1.4.0-next.1

1 year ago

1.5.0-next.0

1 year ago

1.3.24

1 year ago

1.4.0-next.0

1 year ago

1.3.23

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

1 year ago

1.3.18

1 year ago

1.3.17

1 year ago

1.3.16

1 year ago

1.3.15

1 year ago

1.3.14

1 year ago

1.3.13

1 year ago

1.3.12

2 years ago

1.3.11

2 years ago

1.3.10

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.34

2 years ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago