Skip to content

Commit

Permalink
update project names
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Feb 3, 2023
1 parent 71f45b0 commit b5b76bb
Show file tree
Hide file tree
Showing 4 changed files with 270 additions and 222 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @astrojs/cli-kit

## 0.2.2

### Patch Changes

- Update project names

## 0.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@astrojs/cli-kit",
"type": "module",
"version": "0.2.1",
"version": "0.2.2",
"license": "MIT",
"types": "./dist/index.d.ts",
"packageManager": "[email protected]",
Expand Down
5 changes: 4 additions & 1 deletion src/project/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { random } from '../utils/index.js';
export function generateProjectName() {
const adjective = random(adjectives);
const validNouns = nouns.filter(n => n[0] === adjective[0]);
const noun = random(validNouns.length > 0 ? validNouns : nouns);
if (validNouns.length < 2) {
return `${random(adjectives)}-${random(nouns)}`;
}
const noun = random(validNouns);
return `${adjective}-${noun}`;
}
Loading

0 comments on commit b5b76bb

Please sign in to comment.