Giter Site home page Giter Site logo

Comments (3)

belemaire avatar belemaire commented on May 13, 2024

@krunalsshah

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 :

  1. 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.

  1. 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.

belemaire avatar belemaire commented on May 13, 2024

@krunalsshah

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.

krunalsshah avatar krunalsshah commented on May 13, 2024

@belemaire thanks
Issues created
#315
#316

from electrode-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.