Hi guys, I'm really struggling with this, I would really appreciate someone's help on this.
I have set up a location for scss and js:
lib/assets/stylesheets respectively . These both reside in the root of the project, not the
source folder. This is because I need to have a dumping ground for the tons of scripts that may be needed but not every time.
From my intensive newb research on this the
lib/assets/ dir is a location Middleman picks up automatically (correct me if I'm wrong!) In my config.rb file my sass dir is
set :sass_dir, 'stylesheets' within the
source folder and this imports scss from the lib location perfectly. My js is set to
set :js_dir, 'scripts' and even with the above info, I have tried so many things and I cannot appear to get the
require bit right.
To give an example, I have a file in
/scripts in the source folder called
test.js. I would like to be able to import a js file from the
../../../file/path etc and that errors and is a bit unmaintainable. It was my understanding that sprockets picks up a file anywhere within the structure defined by the location set in
config.rb along with any further paths appended.
Please, please, pretty please can someone help me understand this. I've been searching forums and info for days on this.