Added post-revisions package
This package will be used to contain the logic for determining when a revisions should be generated for a post. It will be used by the Post model during saving and will not handle the storage of revisions
This commit is contained in:
parent
8dff121f73
commit
12d0c3bf64
6
ghost/post-revisions/.eslintrc.js
Normal file
6
ghost/post-revisions/.eslintrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: ['ghost'],
|
||||
extends: [
|
||||
'plugin:ghost/node'
|
||||
]
|
||||
};
|
21
ghost/post-revisions/README.md
Normal file
21
ghost/post-revisions/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Post Revisions
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
## Develop
|
||||
|
||||
This is a monorepo package.
|
||||
|
||||
Follow the instructions for the top-level repo.
|
||||
1. `git clone` this repo & `cd` into it as usual
|
||||
2. Run `yarn` to install top-level dependencies.
|
||||
|
||||
|
||||
|
||||
## Test
|
||||
|
||||
- `yarn lint` run just eslint
|
||||
- `yarn test` run lint and tests
|
||||
|
1
ghost/post-revisions/index.js
Normal file
1
ghost/post-revisions/index.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require('./lib/post-revisions');
|
0
ghost/post-revisions/lib/post-revisions.js
Normal file
0
ghost/post-revisions/lib/post-revisions.js
Normal file
26
ghost/post-revisions/package.json
Normal file
26
ghost/post-revisions/package.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@tryghost/post-revisions",
|
||||
"version": "0.0.0",
|
||||
"repository": "https://github.com/TryGhost/Ghost/tree/main/packages/post-revisions",
|
||||
"author": "Ghost Foundation",
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "echo \"Implement me!\"",
|
||||
"test:unit": "NODE_ENV=testing c8 --all --check-coverage --100 --reporter text --reporter cobertura mocha './test/**/*.test.js'",
|
||||
"test": "yarn test:unit",
|
||||
"lint:code": "eslint *.js lib/ --ext .js --cache",
|
||||
"lint": "yarn lint:code && yarn lint:test",
|
||||
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .js --cache"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib"
|
||||
],
|
||||
"devDependencies": {
|
||||
"c8": "7.13.0",
|
||||
"mocha": "10.2.0",
|
||||
"sinon": "15.0.3"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
6
ghost/post-revisions/test/.eslintrc.js
Normal file
6
ghost/post-revisions/test/.eslintrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: ['ghost'],
|
||||
extends: [
|
||||
'plugin:ghost/test'
|
||||
]
|
||||
};
|
8
ghost/post-revisions/test/hello.test.js
Normal file
8
ghost/post-revisions/test/hello.test.js
Normal file
@ -0,0 +1,8 @@
|
||||
const assert = require('assert');
|
||||
|
||||
describe('Hello world', function () {
|
||||
it('Runs a test', function () {
|
||||
// TODO: Write me!
|
||||
assert.ok(require('../index'));
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user