Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

feat: 'list-generators' command #110

Closed
wants to merge 11 commits into from
Closed

feat: 'list-generators' command #110

wants to merge 11 commits into from

Conversation

ulivz
Copy link
Contributor

@ulivz ulivz commented Nov 18, 2018

As shown in following snapshot

image

@egoist
Copy link
Member

egoist commented Nov 18, 2018

I prefer a command sao list-generators 🤔

@ulivz ulivz changed the title feat: '--generators' option feat: 'list-generators' command Nov 18, 2018
@ulivz
Copy link
Contributor Author

ulivz commented Nov 18, 2018

Updated ~

if (name) {
repos.push({ name, version: normalizeVersion(version) })
}
}))
})
])

return { packages, repos }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the generaors info are actually stored in /Users/$USERNAME/Library/Preferences/sao-nodejs/config.json by lib/store.js, maybe we could use that instead since it includes local generators.

sample:

{ 
  "generators": {
    "096eb1e0": {
      "type": "npm",
      "name": "sao-nm",
      "version": "",
      "slug": "sao-nm",
      "subGenerator": false,
      "hash": "096eb1e0",
      "path": "/Users/egoist/.sao/V1/packages/096eb1e0/node_modules/sao-nm"
    },
    "7239d73c": {
      "type": "npm",
      "name": "sao-generator",
      "version": "",
      "slug": "sao-generator",
      "subGenerator": false,
      "hash": "7239d73c",
      "path": "/Users/egoist/.sao/V1/packages/7239d73c/node_modules/sao-generator"
    },
    "a3448d32": {
      "type": "local",
      "path": "/Users/egoist/dev/sao-react",
      "hash": "a3448d32"
    },
    "78c8ed0e": {
      "type": "repo",
      "slug": "nmrshll/frontend-scaffolds#react-tailwind",
      "hash": "78c8ed0e",
      "path": "/Users/egoist/.sao/V1/repos/78c8ed0e"
    }
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ulivz
Copy link
Contributor Author

ulivz commented Nov 18, 2018

Updated:

image

@brpaz
Copy link

brpaz commented Aug 18, 2019

@egoist any change for this to get merged?

@vanntastic
Copy link

vanntastic commented Nov 15, 2019

I just opened up a similar PR that displays a list of the cached generators if you type in sao with no arguments: #137 lol , does this one allow you to select and install a generator from the list?

@ulivz ulivz closed this Nov 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants