Giter Club home page Giter Club logo

Comments (6)

eddyystop avatar eddyystop commented on June 15, 2024

Others contributors have not raised this as an issue. I would think you can install it in a folder, add that folder to the PATH, and create a shell command to call it.

from cli.

samburgers avatar samburgers commented on June 15, 2024

Thanks for the reply! Did a bit of further testing... it's not perfect, but if anyone else is interested in local feathers-plus CLI only, these steps get pretty close to global parity:

Fresh Project

yarn init -y

yarn add @feathers-plus/cli --dev

Add to package.json

"scripts": {
  "fp": "feathers-plus",
},

Now you can run all commands locally like so:

yarn fp generate app
yarn fp generate service

Worth noting after i generated a fresh app, i had to manually add these to the package.json

"scripts": {
  ...
  "dev": "nodemon src/",
  "start": "node src/",
   ...
}

from cli.

eddyystop avatar eddyystop commented on June 15, 2024

This is useful info. Thanks!

Could you confirm having to add dev and start? They are generated with everything else in package.json on generate app.

from cli.

samburgers avatar samburgers commented on June 15, 2024

for some reason the yarn fp generate app command only adds test:all and start:seed to scripts with the above method, leaving you with this after the app is first generated.

"scripts": {
  "fp": "feathers-plus",
  "test:all": "yarn run eslint && NODE_ENV= npm run mocha",
  "start:seed": "NODE_ENV= node src/ --seed"
},

Assume its because we already have a package.json during yarn init in my example.

from cli.

eddyystop avatar eddyystop commented on June 15, 2024

cli+ checks for feathers-gen-specs.json to see if a folder has a generated app. You already have a package.json in the folder when you run generate app. cli+ does not expect that and results are whatever.

What are you doing with cli+?

from cli.

samburgers avatar samburgers commented on June 15, 2024

I don't want to install the CLI as a global package on my machine, I also need a minimal install path for members of the team to get setup.

so it appears i can create a package.json add the CLI as a devDependency and start from there. which gives the above behavior.

Would be great if it could be installed with npx or yarn create as a few other tools do, but the above behavior is more than fine for my particular use case. thanks again!

from cli.

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.