-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(packages/vkui): add missed "type": "module"
Это повлекло за собой следующие изменения: - ~`packages/vkui/shared.config.js`~ – переименование в `.mjs` не удалось из-за **react-styleguidist**, который не умеет в **ESM**, поэтому перенёс в корневой `shared.js`, который используется только в папке `/styleguide` - `stylelint.config.mjs` – заменил импорты из `shared.config.js` на объявление путей прямо в файле - `packages/vkui/cssm/postcss.config.js` → `packages/vkui/cssm/postcss.config.cjs` – заменил импорты из `shared.config.js` на объявление путей прямо в файле - `packages/vkui/scripts/postcss.js` → `packages/vkui/scripts/postcss.cjs` – заменил импорты из `shared.config.js` на объявление путей прямо в файле, а также перенёс объявления `VKUI_TOKENS_CSS` и `generateScopedName` - `packages/vkui/tsconfig.json` – упростил `include`, а то было точечное определение файлов - `packages/vkui/.eslintrc.js` → `packages/vkui/.eslintrc.cjs` - `packages/vkui/rspack.styles.config.ts` → `packages/vkui/rspack.styles.config.mjs` – т.к. начал падать с ошибкой `ERR_UNKNOWN_FILE_EXTENSION`
- Loading branch information
Showing
11 changed files
with
73 additions
and
113 deletions.
There are no files selected for viewing
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/vkui/cssm/postcss.config.js → packages/vkui/cssm/postcss.config.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
const { VERSION, URLS, PATHS } = require('./packages/vkui/shared.config'); | ||
// Используется в папке styleguide/ | ||
|
||
module.exports = { | ||
VKUI_PACKAGE: { | ||
VERSION, | ||
URLS, | ||
PATHS, | ||
}, | ||
const iconPkg = require('./node_modules/@vkontakte/icons/package.json'); | ||
const tokensPkg = require('./node_modules/@vkontakte/vkui-tokens/package.json'); | ||
const vkuiPgk = require('./packages/vkui/package.json'); | ||
|
||
const ROOT_DIR = 'packages/vkui'; | ||
const TS_CONFIG_FOR_DIST = `${ROOT_DIR}/tsconfig.dist.json`; | ||
const SRC_DIR = `${ROOT_DIR}/src`; | ||
const COMPONENTS_DIR = `${SRC_DIR}/components`; | ||
|
||
VKUI_TOKENS_CSS: [ | ||
'./node_modules/@vkontakte/vkui-tokens/themes/vkBase/cssVars/declarations/onlyVariables.css', | ||
'./node_modules/@vkontakte/vkui-tokens/themes/vkBase/cssVars/declarations/onlyVariablesLocal.css', | ||
'./node_modules/@vkontakte/vkui-tokens/themes/vkBaseDark/cssVars/declarations/onlyVariablesLocal.css', | ||
'./node_modules/@vkontakte/vkui-tokens/themes/vkIOS/cssVars/declarations/onlyVariablesLocal.css', | ||
'./node_modules/@vkontakte/vkui-tokens/themes/vkIOSDark/cssVars/declarations/onlyVariablesLocal.css', | ||
'./node_modules/@vkontakte/vkui-tokens/themes/vkCom/cssVars/declarations/onlyVariablesLocal.css', | ||
'./node_modules/@vkontakte/vkui-tokens/themes/vkComDark/cssVars/declarations/onlyVariablesLocal.css', | ||
], | ||
module.exports.VKUI_PACKAGE = { | ||
VERSION: vkuiPgk.version, | ||
|
||
generateScopedName: 'vkui[folder]__[local]', | ||
URLS: { | ||
REPOSITORY: vkuiPgk.repository.url.replace('.git', ''), | ||
ISSUES: vkuiPgk.bugs, | ||
HOMEPAGE: vkuiPgk.homepage, | ||
NPM: 'https://www.npmjs.com/package/@vkontakte/vkui', | ||
TOKENS: tokensPkg.homepage, | ||
ICONS: iconPkg.homepage, | ||
}, | ||
|
||
PATHS: { | ||
ROOT_DIR, | ||
SRC_DIR, | ||
TS_CONFIG_FOR_DIST, | ||
COMPONENTS_DIR, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters