git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| async myFn(myParam) { | |
| // do some external API call, for example | |
| } | |
| async myMainFn() { | |
| const myArray = [1,2,3]; | |
| const myFunctions = []; | |
| for (let x = 0; x < myArray.length; x += 1) { |
| const start = async () => { | |
| const validateInput = async (val) => { | |
| return new Promise((resolve, reject) => { | |
| const acceptedVal = 1; | |
| if (parseInt(val) === acceptedVal) { | |
| resolve('OK'); | |
| } else { | |
| reject(`The valid input is ${acceptedVal}`); |
| <template> | |
| <div class="login"> | |
| <form> | |
| <div> | |
| <label for="">E-mail</label> | |
| <input type="email" v-model="user.email"/> | |
| </div> | |
| <div> | |
| <label for="">Password</label> | |
| <input type="password" v-model="user.password"/> |
| import Vue from 'vue' | |
| export default class ApiClient { | |
| static callAPI (method, url, data) { | |
| const options = { | |
| method: method, | |
| url: `${process.env.VUE_APP_API_URL}/${url}`, | |
| headers: { | |
| 'Content-Type': 'application/json' | |
| } |
| import Vue from 'vue' | |
| import App from './App.vue' | |
| import router from './router' | |
| // import vue-resource module | |
| import VueResource from 'vue-resource' | |
| Vue.config.productionTip = false | |
| // use the vue-resource module | |
| Vue.use(VueResource) |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream