Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
feat(command.collect): bootstrap json generator
Browse files Browse the repository at this point in the history
  • Loading branch information
vnphanquang committed Mar 7, 2022
1 parent ab173f0 commit f172a30
Show file tree
Hide file tree
Showing 14 changed files with 311 additions and 135 deletions.
83 changes: 37 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions package.json
Expand Up @@ -2,9 +2,9 @@
"name": "roullector",
"version": "0.1.0",
"description": "Collect and generate map from file-based routers",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
"type":"commonjs",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"type": "commonjs",
"bin": {
"roullector": "bin/roullector.js"
},
Expand All @@ -20,7 +20,6 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^21.0.2",
"@rollup/plugin-node-resolve": "^13.1.3",
"@types/glob": "^7.2.0",
"@types/node": "^17.0.21",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
Expand All @@ -39,8 +38,6 @@
"typescript-transform-paths": "^3.3.1"
},
"dependencies": {
"chalk": "^5.0.0",
"commander": "^9.0.0",
"glob": "^7.2.0"
"commander": "^9.0.0"
}
}
20 changes: 10 additions & 10 deletions rollup.config.js
Expand Up @@ -28,16 +28,16 @@ const external = [];

/** @type {import('rollup').RollupOptions} */
const config = [
{
input: resolve(__dirname, './src/index.ts'),
output: {
file: resolve(__dirname, pkg.main),
format: 'cjs',
sourcemap: true,
},
external,
plugins,
},
// {
// input: resolve(__dirname, './src/index.ts'),
// output: {
// file: resolve(__dirname, pkg.main),
// format: 'cjs',
// sourcemap: true,
// },
// external,
// plugins,
// },
{
input: resolve(__dirname, './src/cli.ts'),
output: {
Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
@@ -1,7 +1,7 @@
import { Command } from 'commander';

import { collect } from '$commands/collect';
import { collectCli } from '$commands/collect/collect.cli';

const program = new Command();
program.addCommand(collect());
program.addCommand(collectCli());
program.parse(process.argv);

0 comments on commit f172a30

Please sign in to comment.