Skip to content

Commit 80f9bb3

Browse files
committed
fix: Corrections for #1708 being merged too early (#1724)
* fix: Corrections for #1708 being merged too early * test: Fix import path * style: Strip file extensions from imports for consistency
1 parent 055ffa9 commit 80f9bb3

8 files changed

Lines changed: 8 additions & 11 deletions

File tree

β€Žpackages/cli/tests/lib/cli.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { mkdir, symlink, readFile, writeFile } = require('fs').promises;
33
const { build: buildCmd, watch: watchCmd } = require('../../src/commands');
44
const {
55
create: createCmd,
6-
} = require('../../../create-cli/src/commands/create');
6+
} = require('../../../create-cli/lib/commands/create');
77
const { tmpDir } = require('./output');
88
const { disableOptimizeConfig, disableOptimize } = require('./utils');
99

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { error, info } = require('../util');
44

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

7-
module.exports = async function () {
7+
exports.list = async function () {
88
try {
99
const repos = await fetch(REPOS_URL).then(r => r.json());
1010

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env node
22
const sade = require('sade');
3-
const { create } = require('./commands/create.js');
4-
//const { create } = require('./commands/create.js)';
5-
const { error } = require('./util.js');
3+
const { create } = require('./commands/create');
4+
const { list } = require('./commands/list');
5+
const { error } = require('./util');
66

77
const prog = sade('create-preact-app').version('0.1.3');
88

@@ -16,10 +16,7 @@ prog
1616
.option('--git', 'Initialize git repository', true)
1717
.action(create);
1818

19-
//prog
20-
// .command('list')
21-
// .describe('List official templates')
22-
// .action(list);
19+
prog.command('list').describe('List official templates').action(list);
2320

2421
prog.parse(process.argv, {
2522
unknown: arg => {
File renamed without changes.

β€Žpackages/create-cli/package.jsonβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "3.4.0",
44
"description": "Start building a Preact Progressive Web App in seconds.",
55
"repository": "preactjs/preact-cli",
6-
"main": "src/index.js",
7-
"bin": "src/index.js",
6+
"main": "lib/index.js",
7+
"bin": "lib/index.js",
88
"scripts": {
99
"pretest": "rimraf ../cli/tests/output",
1010
"test": "jest"

0 commit comments

Comments
Β (0)