This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var axios = require('axios'); | |
var FormData = require('form-data'); | |
var fs = require('fs'); | |
var data = new FormData(); | |
const jenkinsUrl = 'http://example_jenkins_server_url.com/job/<JOB_NAME>/build'; | |
// notice the URL has build not buildWithParameters if the job has file parameters. ^ | |
const userName = 'example_user'; | |
const password = 'example_pass' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var axios = require('axios'); | |
var qs = require('qs'); | |
const jenkinsUrl = 'http://example_jenkins_server_url.com/job/<JOB_NAME>/buildWithParameters'; | |
// notice the url has buildWithParameters instead of build ^ | |
const userName = 'example_user'; | |
const password = 'example_pass'; | |
const jobParametersObject = { | |
'stringParam1': 'value' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var axios = require('axios'); | |
const jenkinsUrl = 'http://example_jenkins_server_url.com/job/<JOB_NAME>/build'; | |
const userName = 'example_user'; | |
const password = 'example_pass' | |
var config = { | |
method: 'post', | |
url: jenkinsUrl, | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "vue-extension-medium-blog", | |
"version": "1.0.0", | |
"main": "index.js", | |
"repository": "https://github.com/AnandShiva/vue-extension-medium-blog.git", | |
"author": "Anand Kumar <anandkumar.shiva@gmail.com>", | |
"license": "MIT", | |
"scripts": { | |
"build": "webpack --mode='development' --watch" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const CopyPlugin = require('copy-webpack-plugin'); | |
const ExtensionReloader = require('webpack-extension-reloader'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const { VueLoaderPlugin } = require('vue-loader'); | |
module.exports = { | |
context: path.resolve(__dirname, 'src'), | |
entry: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="extension_content"> | |
Vue Content | |
</div> | |
</template> | |
<script> | |
export default { | |
created(){ | |
console.log('Vue Component Initialised') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue'; | |
const ExtensionContainer = require('./Index.vue').default; | |
window.vueInstance = new Vue({ | |
el: `#vue_container`, | |
render: (h) => h(ExtensionContainer), | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const CopyPlugin = require('copy-webpack-plugin'); | |
const ExtensionReloader = require('webpack-extension-reloader'); | |
module.exports = { | |
context: path.resolve(__dirname, 'src'), | |
entry: { | |
'newTab': './newTab.js', | |
'background': './background.js' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> | |
<body> | |
<div id="vue_container"> | |
<h1>This is a Heading</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Vue Extension", | |
"version": "1.0.0", | |
"description": "This is a sample description", | |
"short_name": "Short Sample Name", | |
"permissions": ["activeTab", "declarativeContent", "storage", "<all_urls>"], | |
"chrome_url_overrides" : { | |
"newtab": "newTab.html" | |
}, |
NewerOlder