-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: publish with source code (#713)
- Loading branch information
Showing
74 changed files
with
392 additions
and
102 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@alfalab/core-components-shared': minor | ||
--- | ||
|
||
Новый пакет с общими утилитами и т.п |
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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
--- | ||
'@alfalab/core-components-action-button': minor | ||
'@alfalab/core-components-alert': minor | ||
'@alfalab/core-components-amount': minor | ||
'@alfalab/core-components-amount-input': minor | ||
'@alfalab/core-components-attach': minor | ||
'@alfalab/core-components-backdrop': minor | ||
'@alfalab/core-components-badge': minor | ||
'@alfalab/core-components-bank-card': minor | ||
'@alfalab/core-components-base-modal': minor | ||
'@alfalab/core-components-bottom-sheet': minor | ||
'@alfalab/core-components-button': minor | ||
'@alfalab/core-components-calendar': minor | ||
'@alfalab/core-components-calendar-input': minor | ||
'@alfalab/core-components-calendar-range': minor | ||
'@alfalab/core-components-calendar-with-skeleton': minor | ||
'@alfalab/core-components-card-image': minor | ||
'@alfalab/core-components-cdn-icon': minor | ||
'@alfalab/core-components-chart': minor | ||
'@alfalab/core-components-checkbox': minor | ||
'@alfalab/core-components-checkbox-group': minor | ||
'@alfalab/core-components-circular-progress-bar': minor | ||
'@alfalab/core-components-code-input': minor | ||
'@alfalab/core-components-collapse': minor | ||
'@alfalab/core-components-comment': minor | ||
'@alfalab/core-components-confirmation': minor | ||
'@alfalab/core-components-confirmation-v1': minor | ||
'@alfalab/core-components-custom-button': minor | ||
'@alfalab/core-components-custom-picker-button': minor | ||
'@alfalab/core-components-date-input': minor | ||
'@alfalab/core-components-date-range-input': minor | ||
'@alfalab/core-components-date-time-input': minor | ||
'@alfalab/core-components-divider': minor | ||
'@alfalab/core-components-drawer': minor | ||
'@alfalab/core-components-dropzone': minor | ||
'@alfalab/core-components-file-upload-item': minor | ||
'@alfalab/core-components-filter-tag': minor | ||
'@alfalab/core-components-form-control': minor | ||
'@alfalab/core-components-gallery': minor | ||
'@alfalab/core-components-gap': minor | ||
'@alfalab/core-components-generic-wrapper': minor | ||
'@alfalab/core-components-global-store': minor | ||
'@alfalab/core-components-grid': minor | ||
'@alfalab/core-components-hatching-progress-bar': minor | ||
'@alfalab/core-components-icon-button': minor | ||
'@alfalab/core-components-icon-view': minor | ||
'@alfalab/core-components-indicator': minor | ||
'@alfalab/core-components-input': minor | ||
'@alfalab/core-components-input-autocomplete': minor | ||
'@alfalab/core-components-intl-phone-input': minor | ||
'@alfalab/core-components-keyboard-focusable': minor | ||
'@alfalab/core-components-link': minor | ||
'@alfalab/core-components-list': minor | ||
'@alfalab/core-components-list-header': minor | ||
'@alfalab/core-components-loader': minor | ||
'@alfalab/core-components-masked-input': minor | ||
'@alfalab/core-components-modal': minor | ||
'@alfalab/core-components-mq': minor | ||
'@alfalab/core-components-navigation-bar': minor | ||
'@alfalab/core-components-notification': minor | ||
'@alfalab/core-components-notification-manager': minor | ||
'@alfalab/core-components-number-input': minor | ||
'@alfalab/core-components-pagination': minor | ||
'@alfalab/core-components-pass-code': minor | ||
'@alfalab/core-components-password-input': minor | ||
'@alfalab/core-components-pattern-lock': minor | ||
'@alfalab/core-components-phone-input': minor | ||
'@alfalab/core-components-picker-button': minor | ||
'@alfalab/core-components-plate': minor | ||
'@alfalab/core-components-popover': minor | ||
'@alfalab/core-components-portal': minor | ||
'@alfalab/core-components-progress-bar': minor | ||
'@alfalab/core-components-pure-cell': minor | ||
'@alfalab/core-components-pure-input': minor | ||
'@alfalab/core-components-radio': minor | ||
'@alfalab/core-components-radio-group': minor | ||
'@alfalab/core-components-scrollbar': minor | ||
'@alfalab/core-components-segmented-control': minor | ||
'@alfalab/core-components-select': minor | ||
'@alfalab/core-components-select-with-tags': minor | ||
'@alfalab/core-components-side-panel': minor | ||
'@alfalab/core-components-skeleton': minor | ||
'@alfalab/core-components-slider': minor | ||
'@alfalab/core-components-slider-input': minor | ||
'@alfalab/core-components-sortable-list': minor | ||
'@alfalab/core-components-space': minor | ||
'@alfalab/core-components-spinner': minor | ||
'@alfalab/core-components-stack': minor | ||
'@alfalab/core-components-status': minor | ||
'@alfalab/core-components-stepped-progress-bar': minor | ||
'@alfalab/core-components-steps': minor | ||
'@alfalab/core-components-switch': minor | ||
'@alfalab/core-components-system-message': minor | ||
'@alfalab/core-components-table': minor | ||
'@alfalab/core-components-tabs': minor | ||
'@alfalab/core-components-tag': minor | ||
'@alfalab/core-components-textarea': minor | ||
'@alfalab/core-components-time-input': minor | ||
'@alfalab/core-components-toast': minor | ||
'@alfalab/core-components-toast-plate': minor | ||
'@alfalab/core-components-tooltip': minor | ||
'@alfalab/core-components-typography': minor | ||
'@alfalab/core-components-underlay': minor | ||
'@alfalab/core-components-with-suffix': minor | ||
--- | ||
|
||
- Теперь каждый пакет публикуется с исходниками |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import shell from 'shelljs'; | ||
import fs from 'node:fs'; | ||
import { createRequire } from 'module'; | ||
import { ENTRY_POINTS } from '../entry-points.mjs'; | ||
|
||
const require = createRequire(import.meta.url); | ||
|
||
const packages = shell.exec( | ||
`lerna list \\ | ||
--ignore @alfalab/core-components-codemod \\ | ||
--ignore @alfalab/core-components-vars \\ | ||
--ignore @alfalab/core-components-themes \\ | ||
--all`, | ||
{ silent: true }, | ||
).stdout; | ||
|
||
const packageList = packages | ||
.split('\n') | ||
.map((pkg) => pkg.trim()) | ||
.filter(Boolean) | ||
.map((pkg) => pkg.replace('@alfalab/core-components-', '')); | ||
|
||
function fillExportsField() { | ||
const exports = { | ||
'./vars': './vars/index.js', | ||
'./vars/*': './vars/*', | ||
'./themes/*': './themes/*', | ||
}; | ||
|
||
while (packageList.length) { | ||
const pkgName = packageList.pop(); | ||
const pkgPath = `./packages/${pkgName}/src`; | ||
|
||
ENTRY_POINTS.forEach((entry) => { | ||
const hasEntry = fs.existsSync(`${pkgPath}/${entry}.ts`); | ||
|
||
if (entry === 'index' && hasEntry) { | ||
exports[`./${pkgName}/modern`] = `./${pkgName}/modern/index.js`; | ||
exports[`./${pkgName}/esm`] = `./${pkgName}/esm/index.js`; | ||
exports[`./${pkgName}/cssm`] = `./${pkgName}/cssm/index.js`; | ||
} | ||
|
||
if (hasEntry) { | ||
exports[`./${pkgName}${entry === 'index' ? '' : `/${entry}`}`] = { | ||
import: `./${pkgName}/esm/${entry}.js`, | ||
require: `./${pkgName}/${entry}.js`, | ||
}; | ||
} | ||
}); | ||
|
||
exports[`./${pkgName}/modern/*`] = `./${pkgName}/modern/*`; | ||
exports[`./${pkgName}/esm/*`] = `./${pkgName}/esm/*`; | ||
exports[`./${pkgName}/cssm/*`] = `./${pkgName}/cssm/*`; | ||
} | ||
|
||
const packageJson = require('../dist/package.json'); | ||
packageJson.exports = exports; | ||
|
||
fs.writeFileSync('./dist/package.json', JSON.stringify(packageJson, null, 4)); | ||
} | ||
|
||
fillExportsField(); |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export const ENTRY_POINTS = [ | ||
'index', | ||
'desktop', | ||
'mobile', | ||
'responsive', | ||
'circle', | ||
'super-ellipse', | ||
'rectangle', | ||
'no-shape', | ||
'shared', | ||
'collapsible', | ||
]; |
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 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 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
Oops, something went wrong.