-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Thorfile
37 lines (29 loc) · 759 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
require "thor/group"
module Middleman
class Generator < ::Thor::Group
include ::Thor::Actions
source_root File.expand_path(File.dirname(__FILE__))
def copy_base_template
directory "template", ".", exclude_pattern: /\.DS_Store$/
end
def provide_setup_script
run "chmod a+x bin/setup"
end
def provide_sass_script
run "chmod a+x bin/sass"
end
def run_setup_script
puts "Running the setup script"
run "bin/setup"
end
def initialize_git_repository
puts "Creating Git repository"
run "git init"
end
def netlify?
if yes?("Do you want to use Netlify? (yes/no)")
template "optional-templates/netlify.toml", "netlify.toml"
end
end
end
end