Skip to content
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

Support for typescript project #573

Closed
wemeetagain opened this issue Jun 3, 2020 · 0 comments · Fixed by #737
Closed

Support for typescript project #573

wemeetagain opened this issue Jun 3, 2020 · 0 comments · Fixed by #737

Comments

@wemeetagain
Copy link
Member

Is your feature request related to a problem? Please describe.
In https://github.com/chainsafe/js-libp2p-gossipsub, we're using typescript, and attempting to use aegir as much as possible for building/linting/releasing/etc to maintain as much standardization with the rest of the js-libp2p/js-ipfs ecosystem as possible and build off the great work accomplished here.

Right now, linting and releasing using aegir is not feasible due to assumptions aegir makes about our project.
For linting, the issue is:

  • we check in typescript files to ts/
  • we build javascript to src/
  • aegir only lints src/ and test/

For releasing the issue is:

  • we check in typescript files to ts/
  • we build javascript to src/
  • we don't check in src/ to version control
  • compiling js as a prerelease step creates a dirty repo, no hook is provided in aegir to compile js as part of the release pipeline

Describe the solution you'd like
Ideally, aegir's opinionated processes could be extended to the typescript realm (perhaps exposed w/ a --ts flag ?). To the greatest extent possible, ts->js transpilation can exist as a pre-processing step, and then after that "everything else is treated the same".

Linting, building, releasing can be augmented to

  1. lint ts files directly (using separate typescript linter rules that extend the javascript linter rules)
  2. run tsc to output javascript files when needed, eg to build, test, etc

Not sure what the 'right' workflow should be, just that there seems like an opportunity to extend extend the existing aegir workflow to support typescript-native projects.
If this seems beyond the scope of what aegir is meant for, no worries.

Describe alternatives you've considered
We could continue to work around these issues using package.json scripts and alternative tools when there are unworkable issues.

Additional context
ChainSafe/js-libp2p-gossipsub#80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant