Use Github Action to deploy Vue app to Netlify

Loading

Reading Time: 2 minutes Generate a personal access token and create ACCESS_TOKEN variable under Settings -> Secrets. Keep the personal access token in a safe place and do not lose it Go to Actions tab of the github repo Create netlify.yml under .github/workflow Paste the follow code in the yaml file I deploy the Tic Tac Toe game to … Read more

Use github action to deploy vue app to github page

Loading

Reading Time: < 1 minute Generate a personal access token and create ACCESS_TOKEN variable under Settings -> Secrets. Keep the personal access token in a safe place and do not lose it Go to Actions tab of the github repo Create main.yml under .github/workflow There is no need to write custom deployment script and travis configuration file to automate the … Read more

Add code coverage in Jest in Vue project

Loading

Reading Time: < 1 minute Github: https://github.com/railsstudent/vue-2048 1) Assume Vue project is created by vue-cli 3 and unit testing is enabled 2) Add code coverage in jest configuration in package.json “jest”: { “moduleFileExtensions”: [ “js”, “jsx”, “json”, “vue” ] … // Delete the rest for brevity } 3) Append the following configurations in jest configuration “collectCoverage”: true, “collectCoverageFrom”: [ “src/**/*.vue”, … Read more

Import bootstrap-sass in vuejs

Loading

Reading Time: < 1 minute 1) yarn add bootstrap bootstrap-sass node-sass sass-loader yarn add boostrap bootstrap-sass node-sass sass-loader 2) Set $icon-font-path to find font files and import variable.scss and _bootstrap.scss $icon-font-path: “~bootstrap-sass/assets/fonts/bootstrap/”; @import “~bootstrap-sass/assets/stylesheets/bootstrap/variables”; @import “~bootstrap-sass/assets/stylesheets/_bootstrap.scss”; 3) In main.js, require(‘./assets/sass/main.scss’); 4) type yarn serve to launch application in development mode. Index page should open at url http://localhost:8080. yarn serve https://github.com/vuejs-templates/webpack/issues/166 … Read more