I can't get the adding of custom JS done.
Could you enumerate how to get this right?
What I did was:
Are you using the child theme set-up? If so, custom JS can be added to line 112 of the child's gulp file:
gulp.watch([basePaths.dev + 'js//.js','js//.js','!js/child-theme.js','!js/child-theme.min.js'], ['scripts']);
https://github.com/holger1411/understrap-child/blob/master/gulpfile.js
No, I'm using Parent Theme.
if you look at .gulpconfig.json you can see that basePaths.dev is ./src so your js file needs to live in /src/js/
To avoid confusion:
/src/js/gulp.jspaths.dev + '/js/custom.js'paths.dev + '/js/skip-link-focus-fix.js',Complete code will look like this:
var scripts = [
// Start - All BS4 stuff
paths.dev + '/js/bootstrap4/bootstrap.js',
// End - All BS4 stuff
paths.dev + '/js/skip-link-focus-fix.js',
paths.dev + '/js/custom.js'
];
Thanks for your contributions, @ZacharyElkins and @jsgaonac . As requests upon this feature are adding up recently, I just pushed a commit that麓s based on your proposal, @ZacharyElkins .
Please investigate if it works like intended. It does so on my dev-environtment, though.
See #593 and #602 as duplicates.
Closing this issue as it should be finally resolved now. Feel free to re-open if the problem persists, okay?
Most helpful comment
To avoid confusion:
/src/js/gulp.jspaths.dev + '/js/custom.js'paths.dev + '/js/skip-link-focus-fix.js',Complete code will look like this: