Package specific configuration (for apps and libraries)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- nodejs, react-native, typescript
- Ambito
- build-system, tooling
Direzione di ricerca
Non vengono indicati file di implementazione né test. Inizia risolvendo lo schema di configurazione, il comportamento di ricerca, le regole di scansione delle dipendenze e la gestione dei percorsi specifica della piattaforma proposti qui; il lavoro è completato quando il progetto dispone di una progettazione della configurazione concordata e documentata e di un comportamento chiaro per ogni opzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
We've actively worked towards putting as few restrictions on the packages bringing Node-API modules as possible, to make it more likely to migrate / re-use existing packages intended for Node.js and we would like to continue to support packages providing Node-API modules without requiring package-specific configuration.
How to configure
We could rely on cosmiconfig (which is also used by the React Native Community CLI):
By default, Cosmiconfig will check the current directory for the following:
- a
package.jsonproperty- a JSON or YAML, extensionless "rc file"
- an "rc file" with the extensions
.json,.yaml,.yml,.js,.ts,.mjs, or.cjs- any of the above two inside a
.configsubdirectory- a
.config.js,.config.ts,.config.mjs, or.config.cjsfile
We could load this config starting from the "app" and then look for it in all direct dependencies of the app package and all transitive dependencies explicitly enumerated - see below.
What to configure
Possible configuration options which could optimise the experience:
Library name mapping to paths
We could allow library authors to provide explicit paths for the Node-API prebuilds bundled with their package:
{
// Alternative names for this property could be "addons" or "modules"? 🤔
"prebuilds": [
// Provide a path for a prebuild
"./build/Release/somthing.node",
// Which would be an alias for an object with the same path
{ "path": "./build/Release/somthing.node" },
// Allow overriding the name (default would be "my-lib--addon") used for the library files when linked into the app
{ "name": "addon", "path": "./build/Release/addon.node" },
// Allow specifying platform-specific paths
{
"name": "addon",
"path": {
"android": "./build/Release/addon.android.node",
"ios": "./build/Debug/addon.apple.node"
},
},
]
}
Control scanning
We could group options related to scanning for Node-API modules, either under a "scanning" (or simply "scan") key.
We could enable scanning of specific transitive dependencies (see #367 for use-case)
{
"scanning": {
"dependencies": ["name-of-lib-with-node-api-module"]
}
}
We could provide lists of glob patterns to include and exclude when scanning for modules
{
"scanning": {
"include": ["./build"],
"exclude": ["./node_modules"],
}
}
Or disable scanning all together:
{
"scanning": {
"disabled": true
}
}
- Lingua principale
- TypeScript
- Stelle
- 188
- Fork
- 10
- Merge medio
- 2g 17h
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstackincubator/react-native-node-api
-
Android 🤖
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects ApertaAndroid 🤖 good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
callstackincubator/react-native-node-api#163 · 1 commento ·
-
enhancement good first issue gyp-to-cmake
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
callstackincubator/react-native-node-api#161 · 3 commenti · 1 reazione ·
-
enhancement Host 🏡
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Automatable good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 15/100
callstackincubator/react-native-node-api#424 · 1 commento ·
Tutte le issue di callstackincubator/react-native-node-api
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vicharanashala/fln#563 ·