-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathThorfile
42 lines (34 loc) · 921 Bytes
/
Thorfile
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
require 'json'
require 'rainbow'
require 'thor/group'
module Middleman
class Generator < ::Thor::Group
include ::Thor::Actions
source_root __dir__
def copy_template_files
puts Rainbow('Copying template files...').bright.orange
directory 'template', '.', exclude_pattern: /\.DS_Store$/
`touch .env`
end
def install_gems
puts Rainbow('Installing gems...').bright.orange
system 'bundle install'
end
def install_packages
puts Rainbow('Installing packages...').bright.orange
system 'yarn install'
end
def initialize_git
`git init`
`git add .`
`git commit -m "Initialize new repository with middleman-webpack"`
end
def print_success_message
puts Rainbow('📦 Repository successfully created with middleman-webpack!').bright.orange
end
def exit_script
exec 'zsh'
exit
end
end
end