cr0ybot / gulp-wp

A reusable, extendable, updatable Gulp workflow for WordPress themes & plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scripts task doesn't output files with relative path

cr0ybot opened this issue · comments

The styles task is currently set up to output CSS files with paths relative to the srcBase. If a project customizes styles.entries to include a deeper glob path, it just works, for example:

module.exports = {
	tasks: {
		scripts: {
			entries: [ 'src/scripts/*.*', 'src/scripts/blocks/*/*/*.*' ],
		},
		styles: {
			entries: [ 'src/styles/*.*', 'src/styles/blocks/*/*.*' ],
		},
	},
};

Here, the styles at src/styles/blocks/core/foo.scss are output to dist/css/blocks/core/foo.css as expected, but the script at src/scripts/blocks/core/foo/script.js is output as dist/js/script.js, potentially interfering with a file located at src/js/script.js.