Giter VIP home page Giter VIP logo

cli's Introduction

中文说明

Command interface for Alosaur application

deno run --allow-read --allow-write --allow-net https://deno.land/x/alosaur/cli.ts

Getting start

For generate static files

deno run --allow-read --allow-write --allow-net https://deno.land/x/alosaur/cli.ts g controller testName

For generate project

deno run --allow-read --allow-write --allow-net https://deno.land/x/alosaur/cli.ts new default myProject

In local, run

// generate component home
deno run --allow-read --allow-write --allow-net cli.ts g c home

Enviroments

The Github API is used to generate templates. By default Github has some limitation, in most cases this limitation should be enough. But if you exceed this limit you can run the generation script with env variable GITHUB_TOKEN. Example: GITHUB_TOKEN=123 deno run --allow-read --allow-write --allow-net cli.ts new basic MyProject

Generate personal tokens: https://github.com/settings/tokens > new token > Select scopes > check "Access public repositories"

Commands

alosaur new

deno run --allow-read --allow-write --allow-net cli.ts new basic MyApp

Property Description
basic, cors, db, default, handlebars, spa, static Generate default application with collections in Alosaur examples or specific path resource

alosaur g

Generate template.

Example: alosaur g controller name

Property Alias Description
area a Generate area
controller c Generate controller
class Generate class
service s Generate service with @Injectable decorator
hook h Generate hook
middleware m Generate middleware
path *

*path: Generate one template file from url, template support the Mustache render. Example: `deno run --allow-read --allow-write --allow-net https://raw.githubusercontent.com/alosaur/cli/main/mod.ts path http://myhost.com/test.template name

alosaur run [TODO]

Run multiple applications with configs

alosaur help [TODO]

alosaur openapi [TODO]

Build openapi docs to specific path or default to 'openapi.json'

alosaur e2e [TODO]

E2E tests to REST or websockets endpoints

alosaur test [TODO]

Wrapper over deno test


Contributing

You can put any template you want in any of the generate or apps folders. Just add the desired template and change the source code file generate.ts or new.ts

You can also possible to improve template heplers for Mustach template.helpers.ts.

cli's People

Contributors

borisliu avatar btd1337 avatar irustm avatar nightowl07 avatar silvioprog avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

cli's Issues

what is alosaur.json use for?

Can i ask what does alosaur.json do?

I've noticed in the generator you have alosaur.json but wondering what the purpose of it was? I guess if you generate multiple "apps", you going to want to stack it a bit like angular.cli or nx workspace.json or am I completely wrong?

Referencing alosaur/alosaur#66 about custom DI. I think the CLI would go to be a full wrapper around Deno, including running, so it's self-executing. After much research looks like Deno does support transpiler, so I was thinking to add it as a CLI support, so it has an AST compile and runs the compiled code instead. This way alosaur can add transformer support without it being an issue (for them that want too) Not sure if this takes away from what you were thinking though

Suggested change:

 {
   "apps": [
     {
       "name": "example-app",
       "permissions": [ "--allow-net", "--allow-read" ]
     }
   ]
 }

That way you can have:

deno run --allow-read --allow-write --allow-net cli.ts run example-app

Replace the scaffolded `tsconfig.json` with `deno.jsonc`

Hi,

I'm setting up a test project with Alosaur to find the Deno equivalent of a Nest.js stack.

When using the CLI, a tsconfig.json is generated. After a quick check with the official documentation, it appears deno.json and deno.jsonc are the default since v1.18 (release notes). Can this be updated?

If you prefer for me to create a pull request, feel free to ask.

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.