Switched to extracted `@tryghost/kg-default-atoms` package

no issue

- removed code that now lives in the external Koenig monorepo
This commit is contained in:
Kevin Ansfield 2020-04-08 14:49:14 +01:00
parent fe10d51536
commit 294187c41f
6 changed files with 7 additions and 27 deletions

View File

@ -1,3 +0,0 @@
const softReturn = require('./soft-return');
module.exports = [softReturn];

View File

@ -1,7 +0,0 @@
module.exports = {
name: 'soft-return',
type: 'dom',
render(opts) {
return opts.env.dom.createElement('br');
}
};

View File

@ -24,7 +24,7 @@ module.exports = {
},
get atoms() {
return require('./atoms');
return require('@tryghost/kg-default-atoms');
},
get renderers() {

View File

@ -46,6 +46,7 @@
"@tryghost/helpers": "1.1.25",
"@tryghost/image-transform": "0.2.0",
"@tryghost/kg-card-factory": "1.0.1",
"@tryghost/kg-default-atoms": "1.0.0",
"@tryghost/kg-default-cards": "1.0.1",
"@tryghost/kg-markdown-html-renderer": "1.0.2",
"@tryghost/members-api": "0.18.0",

View File

@ -1,16 +0,0 @@
const should = require('should');
const atom = require('../../../../../core/server/lib/mobiledoc/atoms/soft-return');
const SimpleDom = require('simple-dom');
const serializer = new SimpleDom.HTMLSerializer(SimpleDom.voidMap);
describe('Soft return atom', function () {
it('generates a `br` tag', function () {
let opts = {
env: {
dom: new SimpleDom.Document()
}
};
serializer.serialize(atom.render(opts)).should.match('<br>');
});
});

View File

@ -377,6 +377,11 @@
resolved "https://registry.yarnpkg.com/@tryghost/kg-clean-basic-html/-/kg-clean-basic-html-0.1.7.tgz#8cebadf0189106caef61f480f16092b375b12ef4"
integrity sha512-S7utCsbIVvDd3el2yJ81HtInVg4WiVmmNKQCq8T13KC7oU1MrxUWjRgmieoHv2P9jqCkwPJm9eLQApJj6kp4dQ==
"@tryghost/kg-default-atoms@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@tryghost/kg-default-atoms/-/kg-default-atoms-1.0.0.tgz#d423a0f19a6989051bd6bbc9c8f104c88bd5c738"
integrity sha512-f6a8zIoL2w7aeZbeBj+0UPvFzE1Dd/zf3RGO+L4j/Kb4Z/yqOtoBWQun6I2H37XXoaqiiQc6Z3eW+L4iYSw1Ow==
"@tryghost/kg-default-cards@1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@tryghost/kg-default-cards/-/kg-default-cards-1.0.1.tgz#f6855db115af0868ecbe443a46123f856e006d9a"