Skip to content

Commit 78fa8e9

Browse files
committed
Build entries and types scripts refactoring
1 parent f895db6 commit 78fa8e9

File tree

15 files changed

+13
-26
lines changed

15 files changed

+13
-26
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There is always some ["help wanted" issues](https://github.com/zloirock/core-js/
1616
- For export the polyfill, in all common cases use [`internals/export`](./packages/core-js/modules/export.js) helper. Use something else only if this helper is not applicable - for example, if you want to polyfill accessors.
1717
- If the code of the pure version implementation should significantly differ from the global version (*that's not a frequent situation, in most cases [`internals/is-pure`](./packages/core-js/modules/is-pure.js) constant is enough*), you can add it to [`packages/core-js-pure/override`](./packages/core-js-pure/override) directory. The rest parts of `@core-js/pure` will be copied from `core-js` package.
1818
- Add the feature detection of the polyfill to [`tests/compat/tests.js`](./tests/compat/tests.js), add the compatibility data to [`packages/core-js-compat/src/data.mjs`](./packages/core-js-compat/src/data.mjs), how to do it [see below](#how-to-update-core-js-compat-data).
19-
- Add it to entries definitions, see [`scripts/build-entries/entries-definitions.mjs`](./scripts/build-entries/entries-definitions.mjs).
19+
- Add it to entries definitions, see [`scripts/build-entries-and-types/entries-definitions.mjs`](scripts/build-entries-and-types/entries-definitions.mjs).
2020
- Add unit tests to [`tests/unit-global`](./tests/unit-global) and [`tests/unit-pure`](./tests/unit-pure).
2121
- Add tests of entry points to [`tests/entries/unit.mjs`](./tests/entries/unit.mjs).
2222
- Make sure that you are following [our coding style](#style-and-standards) and [all tests](#testing) are passed.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"zxi": "zx scripts/zxi.mjs",
1919
"prepare": "npm run zxi scripts/prepare.mjs",
2020
"prepare-monorepo": "node scripts/prepare-monorepo.mjs",
21-
"build-entries": "npm run zxi time scripts/build-entries/index.mjs",
21+
"build-entries": "npm run zxi time scripts/build-entries-and-types/build-entries.mjs",
2222
"build-compat": "npm run zxi scripts/build-compat/index.mjs",
23-
"build-types": "npm run zxi time scripts/build-types/index.mjs",
23+
"build-types": "npm run zxi time scripts/build-entries-and-types/build-types.mjs",
2424
"build-website": "npm run zxi time website/index.mjs",
2525
"build-website-local": "npm run zxi time website/build-local.mjs",
2626
"bundle": "run-s bundle-package bundle-tests",
File renamed without changes.

scripts/build-types/pure.mjs renamed to scripts/build-entries-and-types/build-types-pure.mjs

File renamed without changes.

scripts/build-types/index.mjs renamed to scripts/build-entries-and-types/build-types.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { features, proposals } from '../build-entries/entries-definitions.mjs';
2-
import { $path, $proposal } from '../build-entries/templates.mjs';
1+
import { features, proposals } from './entries-definitions.mjs';
2+
import { $path, $proposal } from './templates.mjs';
33
import { modules as AllModules } from '@core-js/compat/src/data.mjs';
4-
import { getModulesMetadata } from '../build-entries/get-dependencies.mjs';
5-
import { expandModules, modulesToStage } from '../build-entries/helpers.mjs';
6-
import { preparePureTypes } from './pure.mjs';
4+
import { getModulesMetadata } from './get-dependencies.mjs';
5+
import { expandModules, modulesToStage } from './helpers.mjs';
6+
import { preparePureTypes } from './build-types-pure.mjs';
77

88
const { copy, outputFile, pathExists, readdir, readFile, readJson, remove, writeJson } = fs;
99
const { green } = chalk;
File renamed without changes.
File renamed without changes.
File renamed without changes.

scripts/build-entries/package-lock.json renamed to scripts/build-entries-and-types/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build-entries/package.json renamed to scripts/build-entries-and-types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "scripts/build-entries",
2+
"name": "scripts/build-entries-and-types",
33
"devDependencies": {
44
"dedent": "^1.7.1"
55
}

0 commit comments

Comments
 (0)