Class: Middleman::Sculptor::Template
- Inherits:
-
Templates::Base
- Object
- Templates::Base
- Middleman::Sculptor::Template
- Defined in:
- lib/middleman-sculptor/template.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.gemfile_template ⇒ Object
14 15 16 |
# File 'lib/middleman-sculptor/template.rb', line 14 def self.gemfile_template 'Gemfile.tt' end |
.source_root ⇒ Object
10 11 12 |
# File 'lib/middleman-sculptor/template.rb', line 10 def self.source_root File.join(File.dirname(__FILE__), 'template') end |
Instance Method Details
#build_scaffold ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/middleman-sculptor/template.rb', line 18 def build_scaffold template 'config.tt', File.join(location, 'config.rb') copy_file '.gitignore', File.join(location, '.gitignore') copy_file '.editorconfig', File.join(location, '.editorconfig') copy_file 'Procfile', File.join(location, 'Procfile') copy_file 'package.json', File.join(location, 'package.json') copy_file 'webpack.config.js', File.join(location, 'webpack.config.js') directory 'source', File.join(location, 'source') directory 'data', File.join(location, 'data') end |
#run_npm ⇒ Object
30 31 32 |
# File 'lib/middleman-sculptor/template.rb', line 30 def run_npm run("cd #{location}; npm install") end |