packages/cli: rename lib/bundle to bundler + serveBundle

This commit is contained in:
Patrik Oldsberg
2020-05-17 12:50:30 +02:00
parent c0336122c0
commit 07cb8ed190
11 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { buildBundle } from '../../lib/bundle';
import { buildBundle } from '../../lib/bundler';
import { Command } from 'commander';
export default async (cmd: Command) => {
+2 -2
View File
@@ -14,11 +14,11 @@
* limitations under the License.
*/
import { startDevServer } from '../../lib/bundle';
import { serveBundle } from '../../lib/bundler';
import { Command } from 'commander';
export default async (cmd: Command) => {
await startDevServer({
await serveBundle({
entry: 'src/index',
checksEnabled: cmd.check,
});
+2 -2
View File
@@ -14,11 +14,11 @@
* limitations under the License.
*/
import { startDevServer } from '../../lib/bundle';
import { serveBundle } from '../../lib/bundler';
import { Command } from 'commander';
export default async (cmd: Command) => {
await startDevServer({
await serveBundle({
entry: 'dev/index',
checksEnabled: cmd.check,
});
@@ -15,4 +15,4 @@
*/
export { buildBundle } from './bundle';
export { startDevServer } from './server';
export { serveBundle } from './server';
@@ -23,7 +23,7 @@ import { createConfig } from './config';
import { ServeOptions } from './types';
import { resolveBundlingPaths } from './paths';
export async function startDevServer(options: ServeOptions) {
export async function serveBundle(options: ServeOptions) {
const host = process.env.HOST ?? '0.0.0.0';
const defaultPort = parseInt(process.env.PORT ?? '', 10) || 3000;