Comments (3)
The API name provided by the user to create-api
command should be the name that is used (and added in the ern
package.json object as moduleName
). This is the same experience as create-miniapp
.
The problem I see here and that we discussed, is that if I specify the name WeatherApi
, then the prompted package name suggestion will be weather-api-api
which is ... bad.
That being said, this is the right name ... because it's more intuitive and looks better to call in Android or iOS or JS WeatherApi.requests. ...
rather than Weather.requests. ...
.
Two things I would suggest here :
- If the module name that the user provide to command, is not suffixed by Api, suggest the user to suffix the Api through a prompt.
i.e, something like
$ ern create-api Weather
> To follow naming conventions we suggest suffixing the name of your API with Api
> Do you want to name the Api as WeatherApi rather than Weather ? Y/n
If the module name provided by the user is already suffixed by Api
, then do not prompt.
- If the module name that the user provide (or modified by prompt) is suffixed by Api, do not add
-api
suffix for package name to avoid-api-api
crap.
Does it makes sense ?
from electrode-native.
BTW for point 2. the same should be applied for create-miniapp
and create-api-impl
Just re-did the Getting Started guide and when I ran ern create-miniapp MovieListMiniApp
it propose a package name as : movie-list-mini-app-miniapp
:(
So let's make point 2. a specific issue.
We should create an issue for point 2. (Do not add module suffix in name if already present
) covering create-miniapp
, create-api
and create-api-impl
and create another issue for point 1. covering create-miniapp
, create-api
and create-api-impl
as well.
from electrode-native.
@belemaire thanks
Issues created
#315
#316
from electrode-native.
Related Issues (20)
- Cauldron/manifest repo clone reference explicit default branch
- Module ElectrodeBridgeTransceiver requires main queue setup since it overrides `constantsToExport` but doesn't implement `requiresMainQueueSetup`.
- Support for main branch naming HOT 1
- Random unit test failures on CI
- ern code-push release doesn't recognize custom application name in cauldron
- Apply patch for react-native version HOT 3
- FBAudienceNetwork in container and client application causes crash
- CVE-2022-23812: YOUR CODE IS INFECTED WITH MALICIOUS DEPENDENCY - node-ipc HOT 1
- ern run-android failing as react component not found even babel plugin "module-resolver" is there
- An error occurred: At least one MiniApp or JS API implementation is needed to generate a composite HOT 7
- run ern run-ios this command, i got a error HOT 2
- How Unity to interact electrode-native ? HOT 1
- Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported (Node.js 17+)
- [Question] - ElectrodeContainer - Why Objective-C & Swift ?
- Error while creating miniapp
- Error while try to add native app on cauldron
- ern run-ios failing with mkdirp error HOT 3
- Add `.cjs` support in the generated Metro config
- Still using node-ipc instead of the fork
- Detect cocoapods issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electrode-native.