mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
Merge pull request #3152 from frewsxcv/node-babel
feat(build): Unify JS config for i18n and scripts
This commit is contained in:
1300
package-lock.json
generated
1300
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -25,8 +25,8 @@
|
||||
"lint:rubocop:fix": "bundle exec rubocop -A",
|
||||
"lint:tsc": "tsc --allowJs false --noEmit",
|
||||
"postinstall": "husky && patch-package",
|
||||
"translate": "node src/i18n/i18ncli.js build",
|
||||
"prepare-fastlane-metadata": "node src/i18n/i18ncli.js prepare-fastlane-metadata",
|
||||
"translate": "babel-node src/i18n/i18ncli.js build",
|
||||
"prepare-fastlane-metadata": "babel-node src/i18n/i18ncli.js prepare-fastlane-metadata",
|
||||
"e2e:android": "npm run e2e:build:android && npm run e2e:test:android",
|
||||
"e2e:build:android": "MOCK_MODE=e2e npx detox build --configuration android.release",
|
||||
"e2e:build:ios": "MOCK_MODE=e2e npx detox build --configuration ios.release",
|
||||
@@ -41,7 +41,7 @@
|
||||
"e2e:test": "npm run e2e:test:ios && npm run e2e:test:android",
|
||||
"e2e": "npm run e2e:build && npm run e2e:test",
|
||||
"icons": "./scripts/update-icon-font.sh",
|
||||
"add-example-model": "node scripts/add-example-model.js",
|
||||
"add-example-model": "babel-node scripts/add-example-model.js",
|
||||
"reassure": "reassure"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -144,6 +144,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/node": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-react": "^7.24.1",
|
||||
"@babel/runtime": "^7.25.0",
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const { DownloaderHelper } = require( "node-downloader-helper" );
|
||||
const fs = require( "fs" ).promises;
|
||||
const path = require( "path" );
|
||||
const yargs = require( "yargs" );
|
||||
import fs from "fs/promises";
|
||||
import { DownloaderHelper } from "node-downloader-helper";
|
||||
import path from "path";
|
||||
import yargs from "yargs";
|
||||
|
||||
const binariesBaseDir
|
||||
= "https://github.com/inaturalist/model-files/releases/download/v25.01.15";
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
/* eslint no-console: 0 */
|
||||
|
||||
const fs = require( "fs" );
|
||||
const path = require( "path" );
|
||||
const yargs = require( "yargs" );
|
||||
|
||||
const {
|
||||
jsonifyLocalizations,
|
||||
supportedLocales,
|
||||
normalizeFileNames,
|
||||
validate,
|
||||
normalize,
|
||||
untranslatable,
|
||||
unused
|
||||
} = require( "./i18ncli/ftl" );
|
||||
const {
|
||||
import fs from "fs";
|
||||
import {
|
||||
copyAndroidTitle,
|
||||
removeUnsupportedDirectories,
|
||||
renameDirectories
|
||||
} = require( "./i18ncli/fastlane" );
|
||||
} from "i18n/i18ncli/fastlane";
|
||||
import {
|
||||
jsonifyLocalizations,
|
||||
normalize,
|
||||
normalizeFileNames,
|
||||
supportedLocales,
|
||||
untranslatable,
|
||||
unused,
|
||||
validate
|
||||
} from "i18n/i18ncli/ftl";
|
||||
import path from "path";
|
||||
import yargs from "yargs";
|
||||
|
||||
// Write loadTranslations.js, a file with a function that statically loads
|
||||
// translation files given a locale
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint no-console: 0 */
|
||||
|
||||
const fsp = require( "fs/promises" );
|
||||
const path = require( "path" );
|
||||
import fsp from "fs/promises";
|
||||
import path from "path";
|
||||
|
||||
const SUPPORTED_APP_STORE_LOCALES = [
|
||||
"ar-SA",
|
||||
@@ -320,7 +320,7 @@ async function copyAndroidTitle( options = {} ) {
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export {
|
||||
copyAndroidTitle,
|
||||
removeUnsupportedDirectories,
|
||||
renameDirectories
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/* eslint no-console: 0 */
|
||||
|
||||
const fluent = require( "fluent_conv" );
|
||||
const fs = require( "fs" );
|
||||
const {
|
||||
parse: parseFtl,
|
||||
serialize: serializeFtl,
|
||||
Resource
|
||||
} = require( "@fluent/syntax" );
|
||||
const fsp = require( "fs/promises" );
|
||||
const path = require( "path" );
|
||||
const util = require( "util" );
|
||||
const { glob } = require( "glob" );
|
||||
const {
|
||||
import {
|
||||
parse as parseFtl,
|
||||
Resource,
|
||||
serialize as serializeFtl
|
||||
} from "@fluent/syntax";
|
||||
import { format, parseISO } from "date-fns";
|
||||
import { enUS } from "date-fns/locale";
|
||||
import fluent from "fluent_conv";
|
||||
import fs from "fs";
|
||||
import fsp from "fs/promises";
|
||||
import { glob } from "glob";
|
||||
import {
|
||||
difference,
|
||||
flatten,
|
||||
sortBy,
|
||||
uniq
|
||||
} = require( "lodash" );
|
||||
const { format, parseISO } = require( "date-fns" );
|
||||
const { enUS } = require( "date-fns/locale" );
|
||||
} from "lodash";
|
||||
import path from "path";
|
||||
import util from "util";
|
||||
|
||||
const I18N_BASE_PATH = path.join( __dirname, ".." );
|
||||
|
||||
@@ -356,7 +356,7 @@ async function normalizeFileNames( ) {
|
||||
} ) );
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export {
|
||||
jsonifyLocalizations,
|
||||
normalize,
|
||||
normalizeFileNames,
|
||||
|
||||
Reference in New Issue
Block a user