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
-
#app_path ⇒ Pathname
Vue app folder path.
-
#build_path ⇒ Pathname
Vue app build folder path.
-
#src_config_path ⇒ Pathname
Vue app source vendor path.
-
#src_path ⇒ Pathname
Vue app source code path.
-
#src_vendor_path ⇒ Pathname
Vue app source vendor path.
Instance Method Details
#app_path ⇒ Pathname
Vue app folder path
13 14 15 |
# File 'lib/vueapp/core/helpers/path.rb', line 13 def app_path Pathname.new(Dir.pwd) end |
#build_path ⇒ Pathname
Vue app build folder path
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_path ⇒ Pathname
Vue app source vendor path
43 44 45 |
# File 'lib/vueapp/core/helpers/path.rb', line 43 def src_config_path src_path.join('config') end |
#src_path ⇒ Pathname
Vue app source code path
31 32 33 |
# File 'lib/vueapp/core/helpers/path.rb', line 31 def src_path app_path.join(VUEAPP_SRC) end |
#src_vendor_path ⇒ Pathname
Vue app source vendor path
37 38 39 |
# File 'lib/vueapp/core/helpers/path.rb', line 37 def src_vendor_path src_path.join('_core', 'vendor') end |