Giter VIP home page Giter VIP logo

generators's People

Contributors

brianleroux avatar kristoferjoseph avatar pchinjr avatar shawnhosea avatar

Watchers

 avatar  avatar  avatar  avatar

generators's Issues

need a help command

there should be one globally accessible help menu always available by running without arguments and then a sub-command explicitly named 'help' to give specific documentation for specific generators.

examples of the help command:

#! arc-gen-beta help mvc

Usage
  
  arc-gen-beta mvc modelname hashkey:*String sortkey:**String ...additional attributes...

Examples

  arc-gen-beta mvc post postID:*String title:string published:boolean body:text

all commands print a banner

running any command prints

Welcome to the Architect Generator Beta
run this command with --help to see info

I would only expect to see this message when:

  • running with no input (eg. arc-gen-beta)
  • running with unknown input (eg. arc-get-beta foo)

(And not when generating code.)

fails running static

Welcome to the Architect Generator Beta
run this command with --help to see info
cp: /Users/brianleroux/src/static/template: No such file or directory
(node:42628) UnhandledPromiseRejectionWarning: Error: Command failed: cp -r /Users/brianleroux/src/static/template /Users/brianleroux/cool
cp: /Users/brianleroux/src/static/template: No such file or directory

    at checkExecSyncError (child_process.js:616:11)
    at execSync (child_process.js:652:15)
    at staticGenerator (/Users/brianleroux/.npm-global/lib/node_modules/arc-gen-beta/src/static/index.js:6:3)
    at cli (/Users/brianleroux/.npm-global/lib/node_modules/arc-gen-beta/cli.js:63:11)
    at async main (/Users/brianleroux/.npm-global/lib/node_modules/arc-gen-beta/cli.js:29:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:42628) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:42628) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
#!```

Create readme

the readme should be focused on what people should do with this program.

give instructions to install deps after creation

if we're going to give output lets make it useful

current:

#! arc-gen-beta auth -d cool
Welcome to the Architect Generator Beta
run this command with --help to see info
created auth example

this would be much better:

#! arc-gen-beta auth -d cool
Successfully generated auth. Install deps are preview by running:

cd /Users/brianleroux/cool
npm i
npm start

also look into putting console output thru stderr so we don't fuck up piping

fails when running on a project subsequently

cli fails when I run repeated. expected behavior: should not fail when running repeatedly in same dir.

steps to repro

arc-gen-beta mvc -d ./cool
arc-gen-beta static -d ./cool

full output:

#! arc-gen-beta mvc -d ./cool
arc-gen-beta static -d ./coolWelcome to the Architect Generator Beta
run this command with --help to see info
created mvc example
#! arc-gen-beta static -d ./cool
Welcome to the Architect Generator Beta
run this command with --help to see info
cp: /Users/brianleroux/src/static/template: No such file or directory
(node:42616) UnhandledPromiseRejectionWarning: Error: Command failed: cp -r /Users/brianleroux/src/static/template /Users/brianleroux/cool
cp: /Users/brianleroux/src/static/template: No such file or directory

    at checkExecSyncError (child_process.js:616:11)
    at execSync (child_process.js:652:15)
    at staticGenerator (/Users/brianleroux/.npm-global/lib/node_modules/arc-gen-beta/src/static/index.js:6:3)
    at cli (/Users/brianleroux/.npm-global/lib/node_modules/arc-gen-beta/cli.js:63:11)
    at async main (/Users/brianleroux/.npm-global/lib/node_modules/arc-gen-beta/cli.js:29:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:42616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:42616) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
#!

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.