Contributing to Spectral: how to run from source?

(Lornajane) #1

I’d like to contribute to spectral. The CONTRIBUTING file shows me how to install the dependencies and run the tests, but not how to run the tool. How can I run spectral from local source to try things out on my development platform? I’m am experienced programmer but not exactly nodejs-native and I’m lost.

(Taylor Barnett) #2

Hey @github1!

You are totally right. The contributing doc does gloss over that part, and I will work on fixing that.

In the meanwhile, are you looking to use it from the CLI or programmatically within JavaScript program?

To build it for the CLI option (which I am assuming is what a lot of people really want):

yarn
yarn build
cd dist
bin/run lint my-openapi-file.json

I’m running through the steps for it programmatically right now to make sure I don’t lead you down the wrong path for that one.

(Lornajane) #3

Thanks, and you saw my patch on the docs. Just noting that something interesting happened with your “Sign in with GitHub” link and now I have @github1 as a username … Do youi want me to report this somewhere?

(Taylor Barnett) #4

@github1 I tried to figure out why this happened, but no idea. I haven’t seen this bug before. I’m going to keep watching it. If you have another one you want to use, we can change your username manually to something else.