Please checkout the FAQ before creating a new issue 🌹
Before doing any meaningful work or even investigating please create an issue for discussion so we don't have duplicate work and we don't step on your toes.
Simply clone the repository, and then link the folder into your packages directory:
git clone https://github.com/TypeStrong/atom-typescript.git
cd atom-typescript
npm install
apm link -lYou still have to reload atom with ctrl+alt+r to test your changes.
Now you can use atom-typescript to develop atom-typescript. This is covered more in the workflow https://github.com/TypeStrong/atom-typescript/blob/master/CONTRIBUTING.md#workflow
(Note: There is more guidance here but what we have is sufficient. apm link -l creates a symlink for the folder into %HOMEPATH%\.atom\packages)
Optional: If you are working on the binaries that are used if we deploy the package to NPM you can run (again from the directory that has package.json):
npm linkWhenever you pull in latest changes, you should run npm install. Whenever we update to latest TypeScript we need to recompile all our js to make sure everybody gets the same code.
You need to have git. Note on windows long file paths can be an issue so run:
git config --system core.longpaths true
And use Shift+Delete to delete files if simple delete doesn't work.
- If you have only fixed bugs in a backward-compatible way (or consider your changes very minimal), run
apm publish patch. - If you have implemented new functionality, run
apm publish minor. (A TypeScript update should at least be minor). - For breaking changes run
apm publish major. These must be justified with a reason documented inchangelog.md
Additional Notes:
- The
apmcommand does a lot for you that you shouldn't do manually. It automatically updates thepackage.json+creates a git tag+pushes to git+pushes to apm. - On windows : storing your github password using
git config --global credential.helper wincredhelps smooth out theapm publish <type>experience.
We develop atom-typescript with atom-typescript
Some shortcuts:
ctrl+alt+iwill open the dev tools. These are the same Chrome dev tools you are familiar with. Feel free to inspect elements. This will come handy when doing UI or even seeing why a particular code element is highlighted in some way.ctrl+alt+rwill reload the entire atom instance.
- We open
atom-typescriptin one atom window - We have
atom-typescript-examplesopen in another atom window - We make changes to
atom-typescriptand save to get the JS. - We reload the
atom-typescript-exampleswindow to see the effects of our change. - Only reload the
atom-typescriptwindow once we are sure that our new code is functional.
This shouldn't happen as long as you leave the atom-typescript window untouched and do testing in another atom instance. If you reload the atom-typescript window thinking its going to be stable but it turns out to be unstable do one of the following:
- Discard the JavaScript changes that you think broke it and reload the atom instance.
The TypeScript Language service docs: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API
The tsserver protocol definitions https://github.com/Microsoft/TypeScript/blob/master/lib/protocol.d.ts
Done using the linter plugin. If you think about it. TypeScript is really just a super powerful version of jshint and that is the reason to use linter for errors.
Just look at linter.ts in our code.
Please see https://github.com/TypeStrong/atom-typescript/tree/master/docs/grammar.md