Skip to content

Instantly share code, notes, and snippets.

View wbern's full-sized avatar

William Bernting wbern

View GitHub Profile
@wbern
wbern / launch.json
Created May 19, 2020 09:10
Let you run unit tests with breakpoints in vscode, using vue-cli-service
{
{
"type": "node",
"request": "launch",
"name": "vue-cli-service test:unit (by open package.json)",
"runtimeExecutable": "node",
"autoAttachChildProcesses": false,
"cwd": "${fileDirname}",
"args": [
"${fileDirname}/vue-cli-service-debug-bin.js",
@wbern
wbern / babel.config.js (probably irrelevant)
Created June 9, 2020 20:39
using forked Web Component wrapping with vue-cli (@telia/vue-web-component-wrapper-ie11)
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
@wbern
wbern / Jenkinsfile rush publish step
Created July 18, 2020 06:38
Example of one way of how Telia Company has done rush publish
stage('Deploy: rush version + publish to npm') {
sshagent(credentials: ['jenkins']) {
if(SHALLOW_CLONE) {
// we need to "unshallow" the git repo for rush publishing/verification purposes
sh "git fetch --unshallow"
}
if("$BRANCH_NAME" == "master") {
// We are on the master branch, so publish the projects from rush.json
@wbern
wbern / Jenkinsfile
Last active April 29, 2021 21:39
changed-rush-projects
# will become: rush build --to @org/project1 --to @org/project2 etc..
"\$(sh ./changed-rush-projects \"node common/scripts/install-run-rush.js --debug build\")"
@wbern
wbern / bin.ts
Last active August 17, 2021 18:13
rush-changed-projects (some process.env vars might be org-specific)
import { getCommand } from "./lib";
import { printCommand } from "./util";
import process from "process";
function main() {
const [
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
__,
@wbern
wbern / bump-caniuse-lite.js
Last active May 12, 2022 20:27
Update caniuse-lite i pnpm-lock.yaml (mostly for Rush users) - PUT INSIDE `scripts/` IN THE REPO ROOT FOR PATHS TO WORK
#!/bin/node
// Script bumps caniuse-lite in common/config/rush/pnpm-lock.yaml
const path = require("path");
const fs = require("fs");
const { execSync } = require("child_process");
async function main() {
const repoRoot = path.join(__dirname, "../");