Skip to content

Commit

Permalink
feat(gatsby-plugin-netlify-cms): add deprecation message for netlify-…
Browse files Browse the repository at this point in the history
…cms (#15588)
  • Loading branch information
wardpeet authored and sidharthachatterjee committed Jul 10, 2019
1 parent 5886544 commit 7932414
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/gatsby-plugin-netlify-cms/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ function replaceRule(value) {
return value
}

exports.onPreInit = ({ reporter }) => {
try {
require.resolve(`netlify-cms`)
reporter.warn(
`The netlify-cms package is deprecated, please install netlify-cms-app instead. You can do this by running "npm install netlify-cms-app"`
)
} catch (err) {
// carry on
}
}

exports.onCreateDevServer = ({ app, store }, { publicPath = `admin` }) => {
const { program } = store.getState()
const publicPathClean = trim(publicPath, `/`)
Expand Down

0 comments on commit 7932414

Please sign in to comment.