-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.sh
More file actions
46 lines (28 loc) · 989 Bytes
/
make.sh
File metadata and controls
46 lines (28 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
rm -rf node_modules/ >/dev/null
defaultPkgName=`basename $(pwd)`
defaultUsername="kyle-west"
read -p "cli-name: ($defaultPkgName)" pkgName
read -p "author github username: ($defaultUsername)" username
read -p "description: " description
pkgName="${pkgName:-$defaultPkgName}"
username="${username:-$defaultUsername}"
echo "building $pkgName..."
find . -mindepth 1 -maxdepth 1 -exec sed -i '' "s#__REPLACE_PACKAGE_NAME_WITH_MAKE_CMD__#$pkgName#g" {} \;
find . -mindepth 1 -maxdepth 1 -exec sed -i '' "s#__REPLACE_DESCRIPTION_WITH_MAKE_CMD__#$description#g" {} \;
find . -mindepth 1 -maxdepth 1 -exec sed -i '' "s#kyle-west#$username#g" {} \;
echo "# $pkgName

$description
## CLI
Example CLI command
\`\`\`
$pkgName test <action> <type> [rest...]
\`\`\`
## Contributing
Run the following to test / dev locally:
\`\`\`
npm install
npm link
\`\`\`
" > README.md
rm make.sh