forked from atomantic/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.projectfn
executable file
·119 lines (104 loc) · 3.02 KB
/
.projectfn
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/sh
# alias heroku.temp="temp && heroku create $1 && heroku ps:exec --status --app $1 && heroku ps:exec "
function init_bash_package() {
name=${1:-'my-app'}
description=${2:-'my-app description'}
npx oclif multi "${name}"
mkdir -p $name && cd $name
npx sort-package-json
bpkg init
init_npm webstorm
git add -A
git commit -m "Initial commit"
gitlab_init $name $description
npx okimdone
}
function init_saber_app() {
name=${1:-'my-app'}
description=${2:-'my-app description'}
mkdir -p $name && cd $name
init_git
init_npm webstorm
npm install saber
# gitlab_init $name $description
npx okimdone
}
# function init_vuepress_app() {
# name=${1:-'my-app'}
# description=${2:-'my-app description'}
# mkdir -p $name && cd $name
# init_git
# init_npm webstorm
# gitlab_init $name $description
# npx okimdone
# }
# function init_node_app() {
# name=${1:-'my-app'}
# description=${2:-'my-app description'}
# mkdir -p $name && cd $name && mkdir src && touch src/index.js
# init_git
# init_npm webstorm
# gitlab_init $name $description
# # heroku git:remote -a $name
# npx okimdone
# }
function init_laravel_app() {
name=${1:-'my-app'}
description=${2:-'my-app description'}
composer create-project --prefer-dist laravel/laravel $name && cd $name
init_git
init_npm laravel phpstorm
gitlab_init $name $description
# heroku git:remote -a $name
npx okimdone
}
# function init_vue_app() {
# name=${1:-'my-app'}
# description=${2:-'my-app description'}
# npx @vue/cli create $name && cd $name && \
# init_npm node webstorm && \
# gitlab_init $name $description
# npx okimdone
# }
# function init_vue_storybook_app() {
# name=${1:-'my-app'}
# description=${2:-'my-app description'}
# npx @vue/cli create $name
# cd $name && \
# init_npm node webstorm && \
# # gitlab_init $name $description
# yarn add --dev @storybook/vue
# yarn add vue
# yarn add --dev vue-loader vue-template-compiler @babel/core babel-loader babel-preset-vue
# # "storybook": "start-storybook"
# mkdir -p ./.storybook/
# mkdir -p ./src/stories/
# cat > ./.storybook/config.js << EOF
# import { configure } from '@storybook/vue';
# import HelloWorld from '../src/components/HelloWorld.vue';
# configure(require.context('../src', true, /\.stories\.js$/), module);
# Vue.component('hello-world', HelloWorld)
# EOF
# cat > ./src/stories/HelloWorld.stories.js << EOF
# import Vue from 'vue';
# import HelloWorld from '../components/HelloWorld.vue';
# export default { title: 'Button' };
# export const withText = () => '<hello-world>with text</hello-world>';
# export const withEmoji = () => '<hello-world>😀 😎 👍 💯</hello-world>';
# export const asAComponent = () => ({
# components: { HelloWorld },
# template: '<hello-world :rounded="true">rounded</hello-world>'
# });
# EOF
# npx okimdone
# start-storybook
# }
# function init_react_app() {
# name=${1:-'my-app'}
# description=${2:-'my-app description'}
# npx create-react-app $name && cd $name
# init_git
# init_npm node webstorm
# gitlab_init $name $description
# npx okimdone
# }