Skip to content

Commit

Permalink
docs(README): update FAQ section on Atom packages
Browse files Browse the repository at this point in the history
This should provide a better explanation of how Atom packages are
hosted, and the difficulty of transpiling prior to publication.
  • Loading branch information
smhxx committed Dec 31, 2017
1 parent d8cf90c commit 3035382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Sort of? Yes and no. Atom does have a very basic, naïve understanding of TypeSc
<details>
<summary><b>Can't I just transpile my package myself?</b></summary>

Yes, absolutely. In fact, *this* package is written in TypeScript and transpiled prior to publishing. However, it's a bit more complicated for Atom packages than it is for npm, in part because apm doesn't currently support `prepublish` scripts. With a custom transpiler, the interpretation of your TypeScript code is handled automatically by Atom itself, with zero performance penalty after the first time the package is installed and run. Either approach is completely valid, so it's up to you to decide which is right for your project.
Yes, absolutely. In fact, *this* package is written in TypeScript and transpiled prior to publishing. However, it's a bit more complicated for Atom packages, since your package is hosted directly from its GitHub repo, rather than published to an external package repository like npm. Users download your package exactly as it exists on your master branch, so if you want your code to be transpiled *prior to* distribution, you'll have to actually commit the transpiled output to the repo (e.g. by setting up a pre-commit hook to run `tsc`,) and the user will end up downloading both the TypeScript and JavaScript versions, anyway. With a custom transpiler, all that mess can be avoided. The transpilation of your TypeScript code is handled automatically by Atom itself, with zero performance penalty after the first time the package is installed and run.
</details>
<details>
<summary><b>How can I contribute to the project?</b></summary>
Expand Down

0 comments on commit 3035382

Please sign in to comment.