Class: AppCommand::CreateUI

Inherits:
Convoy::ActionCommand::Base
  • Object
show all
Defined in:
lib/routes/create/create_ui.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/routes/create/create_ui.rb', line 5

def execute

    begin

        @opts = command_options
        @args = arguments

        @archetypes = get_archetypes

        opts_validate
        opts_routing

    rescue => e

        Blufin::Terminal::print_exception(e)

    end

end

#opts_routingObject

Raises:

  • (RuntimeError)


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/routes/create/create_ui.rb', line 29

def opts_routing

    Blufin::Terminal::info('Create new UI', "You're about to create a new UI from an archetype.")

    # TODO - FINISH THIS...

    Blufin::Terminal::prompt_select('Select Archetype', @archetypes)

    raise RuntimeError, 'Not yet implemented!'

    # TODO - These are the steps I currently run manually...

    # $ cd /path/to/where/i/want/new/ui
    # $ cp -R ~/Repos/blufin-archetypes/nuxt/v1/* .
    # $ rm -rf .nuxt
    # $ rm -rf dist
    # $ rm -rf node_modules
    # $ rm static/sw.js
    # $ rm README.md
    # $ rm yarn.lock
    # $ yarn install
    # $ yarn link blufin-ui
    # $ yarn install
    # In IDE, ran string replace 'blufin-nuxt-v1' -> 'org.blufin' (the only occurrence was in package.json)
    # In IDE, ran string replace 'Blufin Nuxt (v1)' -> 'Blufin' (the only occurrence was in package.json)

end

#opts_validateObject



25
26
27
# File 'lib/routes/create/create_ui.rb', line 25

def opts_validate

end