Skip to content

Commit

Permalink
fix: Corrections for #1708 being merged too early
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Aug 4, 2022
1 parent e5eaba0 commit 0c3b31c
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 8 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { error, info } = require('../util');

const REPOS_URL = 'https://api.github.com/users/preactjs-templates/repos';

module.exports = async function () {
exports.list = async function () {
try {
const repos = await fetch(REPOS_URL).then(r => r.json());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
const sade = require('sade');
const { create } = require('./commands/create.js');
//const { create } = require('./commands/create.js)';
const { list } = require('./commands/list.js');
const { error } = require('./util.js');

const prog = sade('create-preact-app').version('0.1.3');
Expand All @@ -16,10 +16,7 @@ prog
.option('--git', 'Initialize git repository', true)
.action(create);

//prog
// .command('list')
// .describe('List official templates')
// .action(list);
prog.command('list').describe('List official templates').action(list);

prog.parse(process.argv, {
unknown: arg => {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/create-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "3.4.0",
"description": "Start building a Preact Progressive Web App in seconds.",
"repository": "preactjs/preact-cli",
"main": "src/index.js",
"bin": "src/index.js",
"main": "lib/index.js",
"bin": "lib/index.js",
"scripts": {
"pretest": "rimraf ../cli/tests/output",
"test": "jest"
Expand Down

0 comments on commit 0c3b31c

Please sign in to comment.