Skip to content

Instantly share code, notes, and snippets.

@azu
Last active April 8, 2020 00:53
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azu/09dd6f27f52e2e8d9978 to your computer and use it in GitHub Desktop.
Save azu/09dd6f27f52e2e8d9978 to your computer and use it in GitHub Desktop.
node-init.sh
# git pushupで、初めてリポジトリにpushするときに自動的にブランチをpush -uしてくれる
[alias]
pushup = "!gitbranchname() { git symbolic-ref --short HEAD; }; gitpushupstream() { git push --set-upstream origin `gitbranchname`; }; gitpushupstream"
mkdev () {
if [ ! -n "$1" ]
then
echo "Usage: mkdev dir-name"
return
fi
local dirName=$1
local rootDir=$(ghq root)
local githubUser="github.com/$(git config user.name)"
if [[ dirName = */* ]]
then
githubUser = "github.com"
fi
local devPath="${rootDir}/${githubUser}/${dirName}"
mkdir -p ${devPath}
cd ${devPath}
}
#!/bin/bash
git init
# https://github.com/simonwhitaker/gibo
gibo Node JetBrains >> .gitignore
# https://github.com/blaix/license-generator
licgen MIT azu
touch README.md
# create dir
mkdir test
mkdir lib
mkdir src
# create package.json
# https://github.com/azu/init-package-json-parcel
init-package-json
# git
git add .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment