Skip to content

Commit

Permalink
refactor(volto-slate): Upgrade to @plone/volto-slate - refs #153447
Browse files Browse the repository at this point in the history
  • Loading branch information
avoinea committed Oct 26, 2022
1 parent ebca02d commit e642f85
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
3 changes: 2 additions & 1 deletion jest-addon.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ module.exports = {
'@root/(.*)$': '<rootDir>/src/$1',
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
'@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
'@plone/volto-slate':
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
'~/(.*)$': '<rootDir>/src/$1',
'load-volto-addons':
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
Expand Down
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-eea-website-policy",
"version": "0.4.2",
"version": "1.0.0",
"description": "@eeacms/volto-eea-website-policy: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand All @@ -16,15 +16,11 @@
"type": "git",
"url": "git@github.com:eea/volto-eea-website-policy.git"
},
"addons": [
"volto-slate"
],
"dependencies": {
"@plone/scripts": "*",
"volto-slate": "*"
},
"addons": [],
"dependencies": {},
"devDependencies": {
"@cypress/code-coverage": "^3.9.5",
"@plone/scripts": "*",
"@cypress/code-coverage": "^3.10.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"md5": "^2.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isArray } from 'lodash';
import config from '@plone/volto/registry';
import { serializeNodes } from 'volto-slate/editor/render';
import { serializeNodes } from '@plone/volto-slate/editor/render';

export const createSlateParagraph = (text) => {
return isArray(text) ? text : config.settings.slate.defaultValue();
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { runtimeConfig } from '@plone/volto/runtime_config';
import installCallout from 'volto-slate/editor/plugins/Callout';
import installCallout from '@plone/volto-slate/editor/plugins/Callout';
import installContextNavigationBlock from '@eeacms/volto-eea-website-policy/components/Blocks/ContextNavigation';

const applyConfig = (config) => {
Expand Down

0 comments on commit e642f85

Please sign in to comment.