Do i need to enter something else than grunt watch?
And how do i know that script file is included in scripts.min.js, im checking manually with find but i dont find any instance of bxslider into scripts.min.js
@cfx - I think he already added the file, he just probably didn’t add it to the list to compile with everything… That said, I didn’t mention he should copy that one. We’ll see what he replies with.
After adding jshint file i dont have any errors, it jsut isnt added to final scripts.min.js file.
he just probably didn’t add it to the list to compile with everything
Thats the part that i need to do, im just not sure what do i need to add and where, i thought that it is enough to put file in my /assets/js/plugins directory and it will be complied automatically without need to add it in gruntfile.js.
I mean this is not just for bxslider, what are the required steps to add your own custom script to be compiled in scripts.min.js.
Im using latest version of roots, and my grunt is working fine because all my styling works without any problem. Im using phpstorm and its terminal so when i run npm install im in theme root directory.
Line 49 of your gruntfile should be pulling in the most recent version of your JS file, and any js files added to the /plugins/ folder, so you shouldn’t have to do anything as long as you’re running grunt dev or just grunt.
Are you sure your browser hasn’t cached the js file due to an old version of the scripts file?
grunt dev — Compile LESS to CSS, concatenate and validate JS grunt watch — Compile assets when file changes are made grunt build — Create minified assets that are used on non-development environments
If you set define('WP_ENV', 'development'); in your wp-config.php then Roots will not use minified assets.
@cfx - thanks for posting those details to clear it up…
And just FYI @ul71m0, if I’m only using bxSlider on one page, I tend to leave it in the js/plugins folder, DON’T include it in the minified list, and enqueue it conditionally using an is_page_template statement in /lib/scripts, just to keep down page load. The CSS is small for bxSlider so I usually just make it into a .less file and import it into app.less