Skip to content

Commit ab0ba1d

Browse files
authored
chore: store source files in src/ (#7949)
* chore: store source files in src/ * fix tests * fix import * Delete packages/ui-components/.DS_Store Signed-off-by: Aviv Keller <[email protected]> --------- Signed-off-by: Aviv Keller <[email protected]>
1 parent cd48cc3 commit ab0ba1d

File tree

212 files changed

+40
-60
lines changed

Some content is hidden

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

212 files changed

+40
-60
lines changed

.github/workflows/translations-pr-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on:
1313
- 'apps/site/pages/**/*.mdx'
1414
- '!apps/site/pages/en/**/*.md'
1515
- '!apps/site/pages/en/**/*.mdx'
16-
- 'packages/i18n/locales/*.json'
17-
- '!packages/i18n/locales/en.json'
16+
- 'packages/i18n/src/locales/*.json'
17+
- '!packages/i18n/src/locales/en.json'
1818
- 'apps/site/snippets/**/*.bash'
1919
- '!apps/site/snippets/en/**/*.bash'
2020

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ apps/site/.wrangler
4343
## Playwright
4444
test-results
4545
playwright-report
46+
47+
## MacOS Ignored Files
48+
.DS_Store

crowdin.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ files:
4242
pt-BR: pt-br
4343
zh-CN: zh-cn
4444
zh-TW: zh-tw
45-
- source: /packages/i18n/locales/en.json
46-
translation: /packages/i18n/locales/%two_letters_code%.json
45+
- source: /packages/i18n/src/locales/en.json
46+
translation: /packages/i18n/src/locales/%two_letters_code%.json
4747
languages_mapping:
4848
two_letters_code:
4949
es-ES: es

docs/adding-pages.md

Lines changed: 1 addition & 1 deletion

docs/creating-components.md

Lines changed: 1 addition & 1 deletion

docs/downloads-page.md

Lines changed: 1 addition & 1 deletion

packages/i18n/package.json

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,16 @@
22
"name": "@node-core/website-i18n",
33
"type": "module",
44
"exports": {
5-
".": "./lib/index.mjs",
6-
"./config.json": "./config.json",
7-
"./locales/*.json": "./locales/*.json",
8-
"./types": {
9-
"types": "./types.d.ts",
10-
"default": "./types.d.ts"
11-
}
5+
"./*": [
6+
"./src/*",
7+
"./src/*.d.ts",
8+
"./src/*.mjs",
9+
"./src/*.json"
10+
],
11+
".": "./src/index.mjs"
1212
},
13-
"main": "./lib/index.mjs",
14-
"module": "./lib/index.mjs",
15-
"types": "./dist/index.d.mts",
16-
"files": [
17-
"config.json",
18-
"index.js",
19-
"locales",
20-
"types.d.ts"
21-
],
13+
"main": "./src/index.mjs",
14+
"module": "./src/index.mjs",
2215
"scripts": {
2316
"lint": "turbo lint:js",
2417
"lint:js": "eslint \"**/*.{js,mjs,ts}\"",
File renamed without changes.

packages/i18n/lib/index.mjs renamed to packages/i18n/src/index.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict';
22

3-
import localeConfig from '../config.json' with { type: 'json' };
3+
import localeConfig from './config.json' with { type: 'json' };
44

55
/**
66
* Imports a locale when exists from the locales directory
77
*
88
* @param {string} locale The locale code to import
9-
* @returns {Promise<import('../types').Locale>} The imported locale
9+
* @returns {Promise<import('./types').Locale>} The imported locale
1010
*/
1111
export const importLocale = async locale => {
12-
return import(`../locales/${locale}.json`, { with: { type: 'json' } }).then(
12+
return import(`./locales/${locale}.json`, { with: { type: 'json' } }).then(
1313
f => f.default
1414
);
1515
};
@@ -19,7 +19,7 @@ export const importLocale = async locale => {
1919
* This is used for allowing us to redirect the user to any
2020
* of the available locales that we have enabled on the website
2121
*
22-
* @returns {Array<import('../types').LocaleConfig>}
22+
* @returns {Array<import('./types').LocaleConfig>}
2323
*/
2424
export const getAvailableLocales = () =>
2525
localeConfig.filter(locale => locale.enabled);
File renamed without changes.

0 commit comments

Comments
 (0)