mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 01:41:08 +00:00
Fix unnecessary duplication in vite code for finding entrypoints (#35515)
Some checks are pending
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.2) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Some checks are pending
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.2) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
This commit is contained in:
parent
5a88b7f683
commit
e93efe0e13
|
@ -189,11 +189,11 @@ async function findEntrypoints() {
|
||||||
const entrypoints: Record<string, string> = {};
|
const entrypoints: Record<string, string> = {};
|
||||||
|
|
||||||
// First, JS entrypoints
|
// First, JS entrypoints
|
||||||
const jsEntrypoints = await readdir(path.resolve(jsRoot, 'entrypoints'), {
|
const jsEntrypointsDir = path.resolve(jsRoot, 'entrypoints');
|
||||||
|
const jsEntrypoints = await readdir(jsEntrypointsDir, {
|
||||||
withFileTypes: true,
|
withFileTypes: true,
|
||||||
});
|
});
|
||||||
const jsExtTest = /\.[jt]sx?$/;
|
const jsExtTest = /\.[jt]sx?$/;
|
||||||
const jsEntrypointsDir = path.resolve(jsRoot, 'entrypoints');
|
|
||||||
for (const file of jsEntrypoints) {
|
for (const file of jsEntrypoints) {
|
||||||
if (file.isFile() && jsExtTest.test(file.name)) {
|
if (file.isFile() && jsExtTest.test(file.name)) {
|
||||||
entrypoints[file.name.replace(jsExtTest, '')] = path.resolve(
|
entrypoints[file.name.replace(jsExtTest, '')] = path.resolve(
|
||||||
|
@ -204,12 +204,11 @@ async function findEntrypoints() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next, SCSS entrypoints
|
// Next, SCSS entrypoints
|
||||||
const scssEntrypoints = await readdir(
|
|
||||||
path.resolve(jsRoot, 'styles/entrypoints'),
|
|
||||||
{ withFileTypes: true },
|
|
||||||
);
|
|
||||||
const scssExtTest = /\.s?css$/;
|
|
||||||
const scssEntrypointsDir = path.resolve(jsRoot, 'styles/entrypoints');
|
const scssEntrypointsDir = path.resolve(jsRoot, 'styles/entrypoints');
|
||||||
|
const scssEntrypoints = await readdir(scssEntrypointsDir, {
|
||||||
|
withFileTypes: true,
|
||||||
|
});
|
||||||
|
const scssExtTest = /\.s?css$/;
|
||||||
for (const file of scssEntrypoints) {
|
for (const file of scssEntrypoints) {
|
||||||
if (file.isFile() && scssExtTest.test(file.name)) {
|
if (file.isFile() && scssExtTest.test(file.name)) {
|
||||||
entrypoints[file.name.replace(scssExtTest, '')] = path.resolve(
|
entrypoints[file.name.replace(scssExtTest, '')] = path.resolve(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user