Skip to content

add routes command #742

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

Closed
wants to merge 1 commit into from
Closed
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
11 changes: 11 additions & 0 deletions packages/kit/src/cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { existsSync } from 'fs';
import sade from 'sade';
import colors from 'kleur';
import create_manifest_data from './core/create_manifest_data/index.js';
import { load_config } from './core/load_config/index.js';

async function get_config() {
Expand Down Expand Up @@ -152,4 +153,14 @@ prog
console.log('"svelte-kit build" will now run the adapter');
});

prog
.command('routes')
.describe('View routes and endpoints for your app')
.action(async () => {
const config = await get_config();

const { routes } = create_manifest_data({ config });
console.log(routes);
});

prog.parse(process.argv, { unknown: (arg) => `Unknown option: ${arg}` });