Added ExternalMediaInliner package scaffolding
refs https://github.com/TryGhost/Toolbox/issues/524 - This is groundwork to contain logic related to external media scraping/inlining for posts.
This commit is contained in:
parent
ddd43b7daf
commit
29b3da26c3
6
ghost/external-media-inliner/.eslintrc.js
Normal file
6
ghost/external-media-inliner/.eslintrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: ['ghost'],
|
||||
extends: [
|
||||
'plugin:ghost/node'
|
||||
]
|
||||
};
|
23
ghost/external-media-inliner/README.md
Normal file
23
ghost/external-media-inliner/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
# External Media Inliner
|
||||
|
||||
Service that processes post contents and downloads/inlines external media
|
||||
|
||||
|
||||
## 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/external-media-inliner/index.js
Normal file
1
ghost/external-media-inliner/index.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require('./lib/ExternalMediaInliner');
|
5
ghost/external-media-inliner/lib/ExternalMediaInliner.js
Normal file
5
ghost/external-media-inliner/lib/ExternalMediaInliner.js
Normal file
@ -0,0 +1,5 @@
|
||||
class ExternalMediaInliner {
|
||||
|
||||
}
|
||||
|
||||
module.exports = ExternalMediaInliner;
|
26
ghost/external-media-inliner/package.json
Normal file
26
ghost/external-media-inliner/package.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@tryghost/external-media-inliner",
|
||||
"version": "0.0.0",
|
||||
"repository": "https://github.com/TryGhost/Ghost/tree/main/packages/external-media-inliner",
|
||||
"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.1"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
6
ghost/external-media-inliner/test/.eslintrc.js
Normal file
6
ghost/external-media-inliner/test/.eslintrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: ['ghost'],
|
||||
extends: [
|
||||
'plugin:ghost/test'
|
||||
]
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
const assert = require('assert');
|
||||
const ExternalMediaInliner = require('../index');
|
||||
|
||||
describe('ExternalMediaInliner', function () {
|
||||
it('Creates an instance', function () {
|
||||
assert.ok(new ExternalMediaInliner());
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user