JSMonk / hegel

An advanced static type checker
https://hegel.js.org
MIT License
2.09k stars 59 forks source link

Can you provide contribution documentation on how to use the monorepo ? #244

Closed Raynos closed 4 years ago

Raynos commented 4 years ago

I tried installing rush because I saw a rush.json file.

I could not get it to work locally and then i found https://github.com/microsoft/rushstack/issues/886

It sounds like I need to downgrade my global version of npm to 5 to work with rush ?

Here is the output of rush update ( https://gist.github.com/Raynos/9bb7f7c46d5f9ddd6f6f86ae93c54949 ).

For an alternative approach I attempted to use npm link ; for example

This does not work because the package/core folder has no index.js only a build/index.js.

I've hand edited the package.json in @hegel/core to set main to build/index.js

raynos at raynos-Precision-5530  
~/projects/hegel/packages/cli on docs-rush*
$ git diff
diff --git a/packages/core/package.json b/packages/core/package.json
index b25c7d1..6cc5f5c 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -3,7 +3,7 @@
   "author": "Artem Kobzar",
   "version": "0.0.43",
   "description": "",
-  "main": "index.js",
+  "main": "build/index.js",
   "scripts": {
     "prebuild": "npm run build:clean",
     "build": "babel src -d build",

I have no idea how your publishing tool works and why it only publishes the build directory into the NPM tarball and not the entire packages/core directory.

JSMonk commented 4 years ago

Oh, it's a good idea. I will try to describe it the nearest days. Thank you for the idea ^_^.

thecotne commented 4 years ago

@Raynos should be straight forward to work on this project after #252 is merged.

checkout updated "Building Hegel from source" section