Skip to content

Commit 0836763

Browse files
committed
Change root imports to @plone/volto.
Replace all ``~`` root imports with the ``@plone/volto`` alias and remove related dev dependencies. This change allows Volto to be defined as a importable module dependency in another library where the root is different.
1 parent 4b95118 commit 0836763

File tree

100 files changed

+108
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+108
-117
lines changed

.eslintrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
"alias": {
3434
"map": [["@plone/volto", "./src"]],
3535
"extensions": [".js", ".jsx", ".json"]
36-
},
37-
"babel-plugin-root-import": {
38-
"rootPathSuffix": "src"
3936
}
4037
},
4138
"import/core-modules": [ "load-volto-addons" ]

CHANGELOG.md

Lines changed: 3 additions & 0 deletions

babel.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ module.exports = function (api) {
66
'@babel/plugin-proposal-export-default-from', // Stage 1
77
'@babel/plugin-syntax-export-namespace-from', // Stage 4
88
'@babel/plugin-proposal-throw-expressions', // Stage 2
9-
[
10-
'babel-plugin-root-import', // Required for the ~ imports to work
11-
{
12-
rootPathSuffix: 'src',
13-
},
14-
],
159
[
1610
'react-intl', // React Intl extractor, required for the whole i18n infrastructure to work
1711
{

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,10 @@
234234
"@testing-library/react": "11.2.2",
235235
"autoprefixer": "9.7.6",
236236
"axe-core": "3.5.3",
237-
"babel-7-plugin-root-import": "5.4.0",
238237
"babel-eslint": "10.1.0",
239238
"babel-plugin-add-module-exports": "0.2.1",
240239
"babel-plugin-lodash": "3.3.4",
241240
"babel-plugin-react-intl": "5.1.17",
242-
"babel-plugin-root-import": "6.1.0",
243241
"bundlesize": "0.18.0",
244242
"bundlewatch": "0.2.7",
245243
"classnames": "2.2.6",
@@ -263,7 +261,6 @@
263261
"eslint-config-prettier": "6.11.0",
264262
"eslint-config-react-app": "5.2.1",
265263
"eslint-import-resolver-alias": "1.1.2",
266-
"eslint-import-resolver-babel-plugin-root-import": "1.1.1",
267264
"eslint-plugin-flowtype": "4.7.0",
268265
"eslint-plugin-import": "2.20.2",
269266
"eslint-plugin-jsx-a11y": "6.2.3",

src/actions/content/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
UPDATECOLUMNS_CONTENT,
1414
} from '@plone/volto/constants/ActionTypes';
1515
import { nestContent } from '@plone/volto/helpers';
16-
import { settings } from '~/config';
16+
import { settings } from '@plone/volto/config';
1717

1818
/**
1919
* Create content function.

src/actions/content/content.multilingual.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getContent } from './content';
22
import { GET_CONTENT } from '@plone/volto/constants/ActionTypes';
33

4-
jest.mock('~/config', () => ({
4+
jest.mock('@plone/volto/config', () => ({
55
settings: {
66
isMultilingual: true,
77
supportedLanguages: ['de', 'es'],

src/actions/querystringsearch/querystringsearch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { GET_QUERYSTRING_RESULTS } from '@plone/volto/constants/ActionTypes';
2-
import { settings } from '~/config';
2+
import { settings } from '@plone/volto/config';
33

44
/**
55
* Get querystring results.

src/actions/vocabularies/vocabularies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @module actions/vocabularies/vocabularies
44
*/
55

6-
import { settings } from '~/config';
6+
import { settings } from '@plone/volto/config';
77
import {
88
GET_VOCABULARY,
99
GET_VOCABULARY_TOKEN_TITLE,

src/actions/workflow/workflow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
TRANSITION_WORKFLOW,
1010
} from '@plone/volto/constants/ActionTypes';
1111

12-
import { settings } from '~/config';
12+
import { settings } from '@plone/volto/config';
1313

1414
/**
1515
* Get workflow function.

src/components/manage/Add/Add.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { DragDropContext } from 'react-dnd';
1616
import HTML5Backend from 'react-dnd-html5-backend';
1717
import { v4 as uuid } from 'uuid';
1818
import qs from 'query-string';
19-
import { settings } from '~/config';
19+
import { settings } from '@plone/volto/config';
2020
import { toast } from 'react-toastify';
2121

2222
import { createContent, getSchema } from '@plone/volto/actions';
@@ -28,7 +28,7 @@ import {
2828
getBlocksLayoutFieldname,
2929
} from '@plone/volto/helpers';
3030

31-
import { blocks } from '~/config';
31+
import { blocks } from '@plone/volto/config';
3232

3333
import saveSVG from '@plone/volto/icons/save.svg';
3434
import clearSVG from '@plone/volto/icons/clear.svg';

0 commit comments

Comments
 (0)