Commit 5fce0844 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[BUGFIX] make extension path configurable

parent d7097605
{
"directories": {
"extensionRoot": "typo3conf/ext/",
"css": "Resources/Public/StyleSheets",
"sass": "Resources/Public/Sass",
"javascriptSrc": "Resources/Public/JavaScript",
......
'use strict';
var config = require('./config.json'),
extensionPath = 'typo3conf/ext/',
extensionPath = config.directories.extensionRoot,
path = require('path'),
extension = config.extensions[0],
argv = require('yargs').argv;
......
......@@ -17,14 +17,14 @@ gulp.registry(hub);
gulp.task('watch', function() {
for (var extension in config.extensions) {
gulp.watch([
'typo3conf/ext/' + config.extensions[extension] + '/' + config.directories.sass + '/**/*.scss',
config.directories.extensionRoot + config.extensions[extension] + '/' + config.directories.sass + '/**/*.scss',
'!**/_sprite.scss',
'!**/_svg.scss',
'!**/*scsslint_tmp*.scss'
], gulp.series('css:compileAndSync')).on('change', setCurrentExtensionName);
gulp.watch([
'typo3conf/ext/' + config.extensions[extension] + '/' + config.directories.javascriptSrc + '/**/*.js',
config.directories.extensionRoot + config.extensions[extension] + '/' + config.directories.javascriptSrc + '/**/*.js',
'!**/*.min.js'
], gulp.series('js:qa', 'js:compileAndSync')).on('change', setCurrentExtensionName);
}
......@@ -32,7 +32,7 @@ gulp.task('watch', function() {
function setCurrentExtensionName(file) {
plugins.util.log(plugins.util.colors.blue('Change detected in ') + plugins.util.colors.green(file));
settings.setPath(file.split('typo3conf/ext/')[1].split('/')[0]);
settings.setPath(file.split(config.directories.extensionRoot)[1].split('/')[0]);
}
gulp.task('build', gulp.series('images', gulp.parallel('css', 'js')));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment