Module: VueApp::Core::Helpers::Path

Included in:
Builders::JsBuilder, Builders::ScssBuilder, Builders::SlimBuilder
Defined in:
lib/vueapp/core/helpers/path.rb

Overview

Add path helper

Constant Summary collapse

VUEAPP_SRC =
'src'
VUEAPP_BUILD =
'build'

Instance Method Summary collapse

Instance Method Details

#app_pathPathname

Vue app folder path

Returns:

  • (Pathname)


13
14
15
# File 'lib/vueapp/core/helpers/path.rb', line 13

def app_path
  Pathname.new(Dir.pwd)
end

#build_pathPathname

Vue app build folder path

Returns:

  • (Pathname)


19
20
21
22
23
24
25
26
27
# File 'lib/vueapp/core/helpers/path.rb', line 19

def build_path
  if development?
    app_path.join(VUEAPP_BUILD, 'development')
  elsif test?
    app_path.join(VUEAPP_BUILD, 'test')
  else
    app_path.join(VUEAPP_BUILD, 'production')
  end
end

#src_config_pathPathname

Vue app source vendor path

Returns:

  • (Pathname)


43
44
45
# File 'lib/vueapp/core/helpers/path.rb', line 43

def src_config_path
  src_path.join('config')
end

#src_pathPathname

Vue app source code path

Returns:

  • (Pathname)


31
32
33
# File 'lib/vueapp/core/helpers/path.rb', line 31

def src_path
  app_path.join(VUEAPP_SRC)
end

#src_vendor_pathPathname

Vue app source vendor path

Returns:

  • (Pathname)


37
38
39
# File 'lib/vueapp/core/helpers/path.rb', line 37

def src_vendor_path
  src_path.join('_core', 'vendor')
end