Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Toolchain
sgc
Commits
1ebfac8c
Commit
1ebfac8c
authored
Jul 14, 2016
by
Philipp Nowinski
Browse files
[BUGFIX] differenciate between webPath and basePath
parent
8c179642
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/cli.sh
View file @
1ebfac8c
...
...
@@ -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
...
...
gulp/config.json
View file @
1ebfac8c
{
"directories"
:
{
"extensionRoot"
:
"typo3conf/ext/"
,
"basePath"
:
"typo3conf/ext/"
,
"webPath"
:
"typo3conf/ext/"
,
"css"
:
"Resources/Public/StyleSheets"
,
"sass"
:
"Resources/Public/Sass"
,
"javascriptSrc"
:
"Resources/Public/JavaScript"
,
...
...
gulp/css.js
View file @
1ebfac8c
...
...
@@ -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
...
...
gulp/settings.js
View file @
1ebfac8c
'
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
)
{
...
...
gulpfile.js
View file @
1ebfac8c
...
...
@@ -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
'
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment