Class: Rubee::CLI::React
- Inherits:
-
Object
- Object
- Rubee::CLI::React
- Defined in:
- lib/rubee/cli/react.rb
Class Method Summary collapse
- .build(_argv) ⇒ Object
- .call(command, argv) ⇒ Object
- .prepare(_argv) ⇒ Object
- .watch(_argv) ⇒ Object
Class Method Details
.build(_argv) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/rubee/cli/react.rb', line 26 def build(_argv) if Rubee::PROJECT_NAME == 'rubee' exec('cd ./lib && npm run build') else exec('npm run build') end end |
.call(command, argv) ⇒ Object
5 6 7 8 |
# File 'lib/rubee/cli/react.rb', line 5 def call(command, argv) command = argv[1] send(command, argv) end |
.prepare(_argv) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rubee/cli/react.rb', line 10 def prepare(_argv) if Rubee::PROJECT_NAME == 'rubee' exec('cd ./lib && npm run prepare') else exec('npm run prepare') end end |
.watch(_argv) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/rubee/cli/react.rb', line 18 def watch(_argv) if Rubee::PROJECT_NAME == 'rubee' exec('cd ./lib && npm run watch') else exec('npm run watch') end end |