0.0.2 • Published 2 years ago

@platformos/gatsby-plugin-posify v0.0.2

Weekly downloads
-
License
CC-BY-4.0
Repository
-
Last release
2 years ago

gatsby-plugin-posify

Gatsby post-build plugin that creates platformOS release files.

Installation

npm install @platformos/gatsby-plugin-posify

Usage

gatsby-config.js

module.exports = {
  assetPrefix: 'https://uploads.staging.oregon.platform-os.com/instances/<YOUR_INSTANCE_ID>/assets',

  plugins: [
    '@platformos/gatsby-plugin-posify'
  ]
}

The plugin will create the files in the .posify folder in your project root. You can then copy or move the contents of the .posify folder to your pOS project root in a postbuild npm script:

package.json

"scripts": {
  "postbuild": "cp -R .posify/* ../pos" // where `../pos` is the relative path of your pOS project root
}, 

Dependencies

This plugin uses gatsby-plugin-content-hash to add a hash to page-data json files.