Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.

Commit dbe437d

Browse files
author
Seo Yeon, Lee
authored
docs: add fish shell function example
1 parent c1104e1 commit dbe437d

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,38 @@ direnv allow .
232232
yarn run start
233233
```
234234

235+
<details>
236+
<summary>Fish shell function</summary>
237+
238+
```fish
239+
# add ~/.config/fish/config.fish
240+
function generate-web-project
241+
set project $argv[1]
242+
set app $argv[2]
243+
244+
if [ -z $project ] || [ -z $app ]
245+
echo "Undefined arguments $project $app : generate-web-project project app"
246+
else
247+
# create a workspace directory
248+
generate-github-directory https://github.com/rocket-hangar/workspace-template $project
249+
cd $project
250+
251+
# create an app
252+
generate-github-directory https://github.com/rocket-hangar/rocket-scripts-templates/tree/master/templates/web $app
253+
cd $app
254+
cp .envrc.template .envrc
255+
direnv allow .
256+
cd ..
257+
258+
echo "👍 Generated! follow next steps"
259+
echo "Add $app to workspaces of package.json"
260+
echo "And, yarn install"
261+
end
262+
end
263+
```
264+
265+
</details>
266+
235267
# Quick start React Electron app development
236268

237269
<https://github.com/rocket-hangar/rocket-scripts-templates/tree/master/templates/electron>
@@ -260,4 +292,4 @@ yarn run start
260292

261293
# More repositories for reference
262294

263-
- <https://github.com/rocket-hangar/rocket-scripts-templates>
295+
- <https://github.com/rocket-hangar/rocket-scripts-templates>

0 commit comments

Comments
 (0)