Class: Railspack::CLI
- Inherits:
-
Thor
- Object
- Thor
- Railspack::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/railspack/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/railspack/cli.rb', line 7 def self.source_root File.join(File.dirname(__FILE__), 'templates') end |
Instance Method Details
#generate ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/railspack/cli.rb', line 12 def generate copy_file("index.js", "frontend/index.js") copy_file("registerComponent.js", "frontend/registerComponent.js") copy_file("react_helper.rb", "app/helpers/react_helper.rb") copy_file("package.json", "package.json") copy_file("babelrc.js", ".babelrc") copy_file("webpack.js", "webpack.config.babel.js") end |