We're always welcome to issues / PRs 😄
- Clone this repository
git clone https://github.com/Quramy/ts-graphql-plugin.git
cd ts-graphql-plugin
- Install dependencies
npm install --no-save
- Compile TypeScript sources
npm run build
We use Prettier and configure to format sources automatically when they're git staged.
And we use ESLint.
npm run lint
If you add / modify some functions, write unit testing code about them.
Execute the following to run all unit testing codes:
npm run test
In some cases, it's difficult to cover entire functions by unit testing. For example, we should assert "Our language service extension should react when text editor/IDE send a request". We should make sure the whole feature works together correctly.
In such cases, consider adding E2E test specs.
npm run build
npm link
npm link ts-graphql-plugin
npm run e2e all
You can specify test suite name via:
npm run e2e cli # Execute only specs under e2e/cli-specs
You can check manually language service plugin features with our example project.
npm run bulid
npm link
cd project-fixtures/react-apollo-prj
npm install
npm link ts-graphql-plugin
code . # Or launch editor/IDE what you like
Of course, you can use other editor which communicates with tsserver .
You can run CLI using compiled cli.js
. For example:
node lib/cli/cli.js validate -p project-fixtures/gql-errors-prj
Not add new dependencies. ts-graphql-plugin is implemented for the purpose of being able to be installed by users in a short installation time.