From b768e710f1fd7c06912e20e118a533d67b83f167 Mon Sep 17 00:00:00 2001 From: Naz Date: Wed, 1 Mar 2023 13:41:16 +0800 Subject: [PATCH] Bootstrapped media importer package refs https://github.com/TryGhost/Toolbox/issues/523 - This is a base for the media importer package --- ghost/importer-media/.eslintrc.js | 6 +++++ ghost/importer-media/README.md | 23 +++++++++++++++++++ ghost/importer-media/index.js | 1 + ghost/importer-media/lib/importer-media.js | 0 ghost/importer-media/package.json | 26 ++++++++++++++++++++++ ghost/importer-media/test/.eslintrc.js | 6 +++++ ghost/importer-media/test/hello.test.js | 8 +++++++ 7 files changed, 70 insertions(+) create mode 100644 ghost/importer-media/.eslintrc.js create mode 100644 ghost/importer-media/README.md create mode 100644 ghost/importer-media/index.js create mode 100644 ghost/importer-media/lib/importer-media.js create mode 100644 ghost/importer-media/package.json create mode 100644 ghost/importer-media/test/.eslintrc.js create mode 100644 ghost/importer-media/test/hello.test.js diff --git a/ghost/importer-media/.eslintrc.js b/ghost/importer-media/.eslintrc.js new file mode 100644 index 0000000000..c9c1bcb522 --- /dev/null +++ b/ghost/importer-media/.eslintrc.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: ['ghost'], + extends: [ + 'plugin:ghost/node' + ] +}; diff --git a/ghost/importer-media/README.md b/ghost/importer-media/README.md new file mode 100644 index 0000000000..c3f7208ef7 --- /dev/null +++ b/ghost/importer-media/README.md @@ -0,0 +1,23 @@ +# Importer Media + +Media content importer + + +## 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 + diff --git a/ghost/importer-media/index.js b/ghost/importer-media/index.js new file mode 100644 index 0000000000..f76c116f59 --- /dev/null +++ b/ghost/importer-media/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/importer-media'); diff --git a/ghost/importer-media/lib/importer-media.js b/ghost/importer-media/lib/importer-media.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ghost/importer-media/package.json b/ghost/importer-media/package.json new file mode 100644 index 0000000000..291e4a7202 --- /dev/null +++ b/ghost/importer-media/package.json @@ -0,0 +1,26 @@ +{ + "name": "@tryghost/importer-media", + "version": "0.0.0", + "repository": "https://github.com/TryGhost/Ghost/tree/main/packages/importer-media", + "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": {} +} diff --git a/ghost/importer-media/test/.eslintrc.js b/ghost/importer-media/test/.eslintrc.js new file mode 100644 index 0000000000..829b601eb0 --- /dev/null +++ b/ghost/importer-media/test/.eslintrc.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: ['ghost'], + extends: [ + 'plugin:ghost/test' + ] +}; diff --git a/ghost/importer-media/test/hello.test.js b/ghost/importer-media/test/hello.test.js new file mode 100644 index 0000000000..3224ab57bf --- /dev/null +++ b/ghost/importer-media/test/hello.test.js @@ -0,0 +1,8 @@ +const assert = require('assert'); + +describe('Hello world', function () { + it('Runs a test', function () { + // TODO: Write me! + assert.ok(require('../index')); + }); +});