hagana icon indicating copy to clipboard operation
hagana copied to clipboard

hagana.json + CLI

Open asilvas opened this issue 2 years ago • 1 comments

If you provided a basic CLI + hagana.yaml support, you could simplify further (and not require one line of code):

root: "."
modulesFolder: libs
allowedHosts:
  - host1
  - host2 

and run via CLI:

# package.json -> main will be run if no entry provided
npx hagana ./optionalEntryPoint.js

asilvas avatar Jun 24 '22 15:06 asilvas

This is definitely an approach that I'm going to be pursuing.

There is currently a problem with Hagana in that it can't stop pre/postinstall scripts due to them running in a different context. That's why I need to create a Hagana CLI anyways to prevent this behaviour.

Instead of - npm i <package> -> hagana-pm i <package> Instead of - node entryPoint.js -> hagana entryPoint.js

This still leaves the question on dealing with Typescript that need loaders (i.e. ts-node entry, etc.)

yaakov123 avatar Jun 24 '22 15:06 yaakov123