Amplify-js: How to contribute?

Created on 27 Feb 2019  路  5Comments  路  Source: aws-amplify/amplify-js

Hi Team,

Can someone explain how to develop using a fork of this repo in order to create PRs and facilitate debugging? Of course, there is the CONTRIBUTING guide which gives some guidance for best practices, but how do you get to a valid development environment on this project?

Let's say I am on Windows, I have a React basic app, and this cloned repo...

my-app make use of @aws-amplify/auth and @aws-amplify/cache.

Using yarn link, how do I get my-app to use the locally modified version of @aws-amplify/auth?

Probably something like

yarn
yarn run bootstrap
yarn run build
yarn run link

... and in my-app: yarn run link "@amplify-js/auth"

But then I get a message Module not found: Can't resolve '@aws-amplify/core' in 'C:\repos\amplify-js\packages\auth\lib'

help wanted pending-close-response-required

Most helpful comment

Hi @sebastienfi

After doing yarn build on the root directory of aws-amplify, I go to ./packages/aws-amplify and do yarn link.

In order to test my changes on an app. First I install aws-amplify package and then do yarn link aws-amplify.

Pro-tip: When I use VS Code I use tsc: watch - package/auth/tsconfig.json (cmd+shift+b) so every time I make a change on any src file inside of that package it compiles immediately, so you don't need to build manually again.

I hope that helps

All 5 comments

Hi @sebastienfi

After doing yarn build on the root directory of aws-amplify, I go to ./packages/aws-amplify and do yarn link.

In order to test my changes on an app. First I install aws-amplify package and then do yarn link aws-amplify.

Pro-tip: When I use VS Code I use tsc: watch - package/auth/tsconfig.json (cmd+shift+b) so every time I make a change on any src file inside of that package it compiles immediately, so you don't need to build manually again.

I hope that helps

Thanks for the heads up!

@mlabieniec Would this be a nice addition to the docs?

@sebastienfi we are going to update our wiki/README with this information.

@elorzafe Are there any essential readmes for first-time FOSS (Javascript) contributors? I'd like to contribute some code in my free time to the Amplify codebase, but I really don't know how to get started. Plus I don't want to slow down the work on a project with learning how to FOSS-contribute.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leantide picture leantide  路  3Comments

guanzo picture guanzo  路  3Comments

simon998yang picture simon998yang  路  3Comments

benevolentprof picture benevolentprof  路  3Comments

callmekatootie picture callmekatootie  路  3Comments