Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove h alias of host option #181

Merged
merged 1 commit into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/commands/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export default asyncCommand({
},
host: {
description: 'Hostname to start a server on',
default: '0.0.0.0',
alias: 'h'
default: '0.0.0.0'
},
https: {
description: 'Use HTTPS?',
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export const serve = (appDir, port) => withLog(
'preact serve'
);

export const watch = (appDir, port) => withLog(
() => spawnPreact(['watch', port ? `-p=${port}` : undefined], appDir),
export const watch = (appDir, host, port) => withLog(
() => spawnPreact(['watch', host ? `--host=${host}` : undefined, port ? `-p=${port}` : undefined], appDir),
Copy link
Member

@reznord reznord Jul 3, 2017

Choose a reason for hiding this comment

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

I don't think it is necessary to provide a host here separately. No harm specifying tho. Otherwise looks good to me !! :)

'preact watch'
);

Expand Down
2 changes: 1 addition & 1 deletion tests/watch.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('preact', () => {
let { Runtime } = chrome;
let app = await create('app');
await build(app);
server = await watch(app, 8083);
server = await watch(app, '127.0.0.1', 8083);
let headerComponentSourceFile = resolve(app, './src/components/header/index.js');

await loadPage(chrome, 'http://localhost:8083/');
Expand Down