Skip to content

Instantly share code, notes, and snippets.

View luisliuchao's full-sized avatar

Liu Chao luisliuchao

View GitHub Profile
@luisliuchao
luisliuchao / sk-eslint-disable.sh
Last active October 3, 2017 01:01
Automatically add /* eslint-disable */ at the beginning of all *.js files excluding node_modules and bower_components
function addEslintDisable {
filepath="$1"
if [ -d $filepath ] && [[ $filepath != node_modules ]] && [[ $filepath != bower_components ]]
then
for file in $(ls $filepath | cat); do
newfilepath="$filepath/$file"
$(addEslintDisable $newfilepath)
done
elif [[ $filepath = *.js ]]
then
@luisliuchao
luisliuchao / sk-release
Last active December 6, 2019 01:54
Automatically make a release by incrementing the version number in package.json or with a version number supplied
# SK Release
# https://gist.github.com/bclinkinbeard/1331790
#!/bin/bash
# file in which to update version number
versionFile="package.json"
# extract version number from versionFile
# https://gist.github.com/DarrenN/8c6a5b969481725a4413