View App.vue
<template> | |
<div id="app"> | |
<p>Count: {{ count }}</p> | |
<div> | |
<ButtonDecrease | |
:label="labels.decrease" | |
:count="count" | |
@buttonClicked="handleDecrease" | |
/> | |
<ButtonIncrease |
View SvgPathIcon.vue
<template> | |
<svg | |
xmlns="http://www.w3.org/2000/svg" | |
width="24" | |
height="24" | |
viewBox="0 0 24 24" | |
> | |
<path :d="path" /> | |
</svg> | |
</template> |
View puppeteer.js
const puppeteer = require('puppeteer'); | |
(async () => { | |
try { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
await page.goto('https://bvopen.abrickis.me/#/standings'); | |
await page.waitForSelector('.category', { timeout: 1000 }); | |
const body = await page.evaluate(() => { |
View axios-cheerio.js
const axios = require('axios'); | |
const cheerio = require('cheerio'); | |
(async () => { | |
try { | |
const response = await axios.get('https://bvopen.abrickis.me/#/standings'); | |
const $ = cheerio.load(response.data); | |
console.log($('body').html()); | |
} catch (error) { |
View lighthouse-azure-devops-main.ts
/// <reference path="./node_modules/lighthouse/typings/externs.d.ts"/> | |
import * as fs from 'fs'; | |
import * as chromeLauncher from 'chrome-launcher'; | |
import lighthouse from 'lighthouse/lighthouse-core'; | |
import ReportGenerator from 'lighthouse/lighthouse-core/report/report-generator'; | |
const run = async (url: string, options: chromeLauncher.Options) => { | |
const chrome: chromeLauncher.LaunchedChrome = await chromeLauncher.launch({ chromeFlags: options.chromeFlags }); | |
options.port = chrome.port; |
View assets.js
const CSS = [ | |
'jquery-ui-dist/jquery-ui.min.css', | |
'jquery-datetimepicker/jquery.datetimepicker.css' | |
]; | |
const JS = [ | |
'jquery-ui-dist/jquery-ui.min.js', | |
'jquery-datetimepicker/jquery.datetimepicker.min.js', | |
'jquery/dist/jquery.min.js', | |
'lodash/lodash.min.js' | |
]; |
View webpack.config.js
const path = require('path'); | |
const webpack = require('webpack'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
// assets.js | |
const Assets = require('./assets'); | |
module.exports = { | |
entry: { | |
app: "./app.js", |
View CopyWebpackPlugin
new CopyWebpackPlugin([ | |
{ | |
from: './source/script_a.js', | |
to: './target' | |
}, | |
{ | |
from: './source/css_a.js', | |
to: './target' | |
} | |
]) |
View package.json
{ | |
"name": "bower-to-webpack", | |
"description": "Bye bye Bower! Or how to migrate from Bower to npm and Webpack", | |
"author": "Andrejs Abrickis", | |
"dependencies": { | |
"jquery": "^2.1.4", | |
"jquery-datetimepicker": "https://github.com/xdan/datetimepicker/archive/2.5.4.tar.gz", | |
"jquery-ui-dist": "^1.12.1", | |
"lodash": "^4.17.2" | |
}, |
NewerOlder