Added :js_assets_paths for external JS repositories
Please Note! This fix depends upon support in the 'middleman-sprockets' gem, where the following code must be present: # lib/middleman-sprockets/extension.rb <snip…> append_path app.css_dir # add custom assets paths to the scope app.js_assets_paths.each do |p| append_path p end The purpose of this addition is to support including JS files from external (global) repositories. Example usage: # in config.rb set :js_assets_path, [ "#{root}/assets/js/", "~/.js-repo/"] Using symlinks or copying files to the Middleman project can get messy quickly. This fix reduces some of those issues.
This commit is contained in:
parent
3ea2241155
commit
95339dad23
1 changed files with 5 additions and 0 deletions
|
@ -109,6 +109,11 @@ module Middleman
|
|||
# @return [String]
|
||||
set :css_dir, "stylesheets"
|
||||
|
||||
# Location of javascripts external to source directory.
|
||||
# @return [Array]
|
||||
# set :js_assets_paths, ["#{root}/assets/javascripts/", "/path/2/external/js/repository/"]
|
||||
set :js_assets_paths, []
|
||||
|
||||
# Location of SASS/SCSS files external to source directory.
|
||||
# @return [Array]
|
||||
# set :sass_assets_paths, ["#{root}/assets/sass/", "/path/2/external/sass/repository/"]
|
||||
|
|
Loading…
Reference in a new issue