Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pôle IS
Outillage
prezbuilder
Commits
56d07e07
Commit
56d07e07
authored
May 01, 2020
by
Guillaume Perréal
Browse files
Renomme "images" en "assets" (et inclut les SVG).
parent
b516acc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
gulpfile.js
View file @
56d07e07
...
...
@@ -5,14 +5,17 @@ const pandoc = require("gulp-pandoc");
const
SRC_DIR
=
process
.
env
.
SRC
||
"
src
"
;
const
DEST_DIR
=
process
.
env
.
OUTPUT
||
"
public/
"
;
const
ASSET_GLOB
=
`
${
SRC_DIR
}
/**/*.{png,gif,jpg,svg}`
;
const
PREZ_GLOB
=
`
${
SRC_DIR
}
/**/index.md`
;
const
assets
=
()
=>
src
(
ASSET_GLOB
).
pipe
(
dest
(
DEST_DIR
));
const
REVEALJS_URL
=
process
.
env
.
REVEALJS_URL
||
"
https://pole-is.gitlab.irstea.page/tools/reveal.js
"
;
const
images
=
()
=>
src
(
`
${
SRC_DIR
}
/**/*.{png,gif,jpg}`
).
pipe
(
dest
(
DEST_DIR
));
const
prez
=
()
=>
src
(
`
${
SRC_DIR
}
/**/index.md`
)
src
(
PREZ_GLOB
)
.
pipe
(
pandoc
({
from
:
...
...
@@ -37,7 +40,7 @@ const prez = () =>
)
.
pipe
(
dest
(
DEST_DIR
));
exports
.
default
=
exports
.
build
=
parallel
(
image
s
,
prez
);
exports
.
default
=
exports
.
build
=
parallel
(
asset
s
,
prez
);
const
serve
=
()
=>
{
src
(
DEST_DIR
).
pipe
(
...
...
@@ -49,9 +52,7 @@ const serve = () => {
);
};
const
watch_prez
=
()
=>
watch
(
`
${
SRC_DIR
}
/**/index.md`
,
{
ignoreInitial
:
false
},
prez
);
const
watch_images
=
()
=>
watch
(
`
${
SRC_DIR
}
/**/*.{png,gif,jpg}`
,
{
ignoreInitial
:
false
},
images
);
const
watch_prez
=
()
=>
watch
(
PREZ_GLOB
,
{
ignoreInitial
:
false
},
prez
);
const
watch_assets
=
()
=>
watch
(
ASSET_GLOB
,
{
ignoreInitial
:
false
},
assets
);
exports
.
dev
=
parallel
(
serve
,
watch_prez
,
watch_
image
s
);
exports
.
dev
=
parallel
(
serve
,
watch_prez
,
watch_
asset
s
);
Write
Preview
Markdown
is supported
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