Class: RTFDoc::Bootstrap
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- RTFDoc::Bootstrap
- Includes:
- Thor::Actions
- Defined in:
- lib/rtfdoc/generators/bootstrap.rb
Instance Method Summary collapse
- #create_config ⇒ Object
- #create_gemfile ⇒ Object
- #create_root_directory ⇒ Object
- #create_skeleton ⇒ Object
- #create_webpack_config ⇒ Object
Instance Method Details
#create_config ⇒ Object
31 32 33 |
# File 'lib/rtfdoc/generators/bootstrap.rb', line 31 def create_config template('config.yml.erb', "#{name}/config.yml") end |
#create_gemfile ⇒ Object
22 23 24 |
# File 'lib/rtfdoc/generators/bootstrap.rb', line 22 def create_gemfile template('Gemfile.erb', "#{name}/Gemfile") end |
#create_root_directory ⇒ Object
12 13 14 |
# File 'lib/rtfdoc/generators/bootstrap.rb', line 12 def create_root_directory FileUtils.mkdir_p(name) end |
#create_skeleton ⇒ Object
16 17 18 19 20 |
# File 'lib/rtfdoc/generators/bootstrap.rb', line 16 def create_skeleton FileUtils.mkdir_p("#{name}/content") FileUtils.mkdir_p("#{name}/dist") copy_file('gitignore', "#{name}/.gitignore") end |
#create_webpack_config ⇒ Object
26 27 28 29 |
# File 'lib/rtfdoc/generators/bootstrap.rb', line 26 def create_webpack_config template('package.json.erb', "#{name}/package.json") copy_file('webpack.config.js', "#{name}/webpack.config.js") end |