Commit 1ebfac8c authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[BUGFIX] differenciate between webPath and basePath

parent 8c179642
......@@ -9,7 +9,7 @@ if [ $SGC_VERSION != $INSTALLED_SGC_VERSION ]; then
fi
if [ "$1" == "shortlist" ]; then
echo server images css css:sprites css:svg css:abovethefold images:uploaded js:compile js:qa js shortlist;
echo "server images css css:sprites css:svg css:abovethefold images:uploaded js:compile js:qa js updateInstance shortlist " `ls sgc-scripts | grep .sh$ | cut -f 1 -d .`;
elif [ -e "sgc-core/modules/$1.sh" ]; then
./sgc-core/modules/$1.sh
elif [ -e "./sgc-scripts/$1.sh" ]; then
......
{
"directories": {
"extensionRoot": "typo3conf/ext/",
"basePath": "typo3conf/ext/",
"webPath": "typo3conf/ext/",
"css": "Resources/Public/StyleSheets",
"sass": "Resources/Public/Sass",
"javascriptSrc": "Resources/Public/JavaScript",
......
......@@ -65,7 +65,7 @@ gulp.task('css:sprites', function() {
var spriteData = gulp.src(settings.getPath() + '/' + config.directories.sprites + '/**/*.png').pipe(plugins.spritesmith({
imgName: 'sprites.png',
cssName: '_sprite.scss',
imgPath: '/' + settings.getPath() + '/' + config.directories.images + '/sprites.png'
imgPath: '/' + settings.getPath(true) + '/' + config.directories.images + '/sprites.png'
}));
// Pipe image stream through image optimizer and onto disk
......
'use strict';
var config = require('./config.json'),
extensionPath = config.directories.extensionRoot,
extensionPath = config.directories.basePath,
webPath = config.directories.webPath,
path = require('path'),
extension = config.extensions[0],
argv = require('yargs').argv;
module.exports.getPath = function() {
module.exports.getPath = function(isWebPath) {
var extensionName = (typeof argv.ext !== 'undefined') ? argv.ext : extension;
return path.join(extensionPath, extensionName);
return typeof isWebPath !== "undefined" ? path.join(webPath, extensionName) : path.join(extensionPath, extensionName);
};
module.exports.setPath = function(extensionName) {
......
......@@ -17,14 +17,14 @@ gulp.registry(hub);
gulp.task('watch', function() {
for (var extension in config.extensions) {
gulp.watch([
config.directories.extensionRoot + config.extensions[extension] + '/' + config.directories.sass + '/**/*.scss',
config.directories.basePath + config.extensions[extension] + '/' + config.directories.sass + '/**/*.scss',
'!**/_sprite.scss',
'!**/_svg.scss',
'!**/*scsslint_tmp*.scss'
], gulp.series('css:compileAndSync')).on('change', setCurrentExtensionName);
gulp.watch([
config.directories.extensionRoot + config.extensions[extension] + '/' + config.directories.javascriptSrc + '/**/*.js',
config.directories.basePath + 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(config.directories.extensionRoot)[1].split('/')[0]);
settings.setPath(file.split(config.directories.basePath)[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