-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force CPTs that don't declare show_in_rest to be shown thus allowing …
…for the export of all CPTs - see #14
- Loading branch information
Showing
13 changed files
with
201 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
>=14.17.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* This script executes before "npm install" | ||
* Lock the version of Node running based on the one set in the package.json | ||
*/ | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
const semver = require ('semver'); | ||
|
||
const packageJson = require('../package.json'); | ||
const requiredNodeVersion = packageJson.engines.node; | ||
|
||
const runningNodeVersion = process.version; | ||
|
||
// set .nvmrc and .node_version to have the same version | ||
fs.writeFileSync(path.join(__dirname, '../.node-version'), requiredNodeVersion, 'UTF8'); | ||
// This way we could have a bash or zsh script that would automatically use the latest installed version of node from this major release. | ||
// Not ideal, but since nvm doesn't support ranges... :| | ||
fs.writeFileSync(path.join(__dirname, '../.nvmrc'), semver.minVersion(requiredNodeVersion).major.toString(), 'UTF8'); | ||
|
||
// check that the required version of Node is running | ||
if (!semver.satisfies(runningNodeVersion, requiredNodeVersion)) { | ||
console.error(` | ||
The current node version ${runningNodeVersion} does not satisfy the required version ${requiredNodeVersion} . | ||
If you have NVM and AVN installed, just exit the project folder and cd into it again (learn more about AVN: https://github.com/wbyoung/avn). | ||
Or you may just use NVM to install and use the needed node version. | ||
`); | ||
|
||
// kill the process if the required node version is not the one running | ||
process.exit(1); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "pixelgrade-care-node-tasks", | ||
"description": "Tasks to ensure uniform node version usage.", | ||
"private": false, | ||
"sideEffects": false, | ||
"license": "GPL-2.0+", | ||
"dependencies": { | ||
"semver": "^7.3.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters