TypeStrong/dts-bundle

CLI ?

Semigradsky opened this issue · 4 comments

Running using npm script would be very convenient

It will be nice to have.

I'm not sure how to implement it ...

I can think of two ways:

  1. To add code to index.ts inspect process.argv searching parameters ...
  2. To add new module, ie: cli.ts that import and use bundle function from index.ts...

@basarat can you tell me about?

I not sure how to determine if a module is running directly with nodejs or included from other ...

I not sure how to determine if a module is running directly with nodejs or included from other

With examples :

Developer (you)

User

  • To use such a file they can either do npm install -g alm. This gives them the executables from the package.json bin on the user system command line
  • They can install it as a dev dependency and use scripts option in package.json to drive it e.g. :
"scripts": {
    "build": "alm -p ./src"
},

🌹

Done.