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
89cddb88
Commit
89cddb88
authored
Jul 01, 2020
by
Guillaume Perréal
Browse files
Utilise la version de @devatscience/reveal.js publiée sur NPM.
parent
9200a003
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
gulpfile.esm.js/build.js
View file @
89cddb88
import
{
ASSET_GLOB
,
DEST_DIR
,
GRAPH_GLOB
,
PDF_GLOB
,
PREZ_GLOB
,
REVEALJS_URL
}
from
"
./config
"
;
import
{
dest
,
lastRun
,
parallel
,
series
,
src
}
from
"
gulp
"
;
import
autoindex
from
"
./plugins/autoindex
"
;
import
{
build_revealjs
}
from
"
./revealjs
"
;
import
del
from
"
del
"
;
import
drawio
from
"
./plugins/drawio
"
;
import
pandoc
from
"
./plugins/pandoc
"
;
import
spy
from
"
./plugins/spy
"
;
import
wkhtmltopdf
from
"
./plugins/wkhtmltopdf
"
;
import
del
from
'
del
'
;
import
{
dest
,
lastRun
,
parallel
,
series
,
src
}
from
'
gulp
'
;
import
{
ASSET_GLOB
,
DEST_DIR
,
GRAPH_GLOB
,
PDF_GLOB
,
PREZ_GLOB
,
REVEALJS_URL
}
from
'
./config
'
;
import
autoindex
from
'
./plugins/autoindex
'
;
import
drawio
from
'
./plugins/drawio
'
;
import
pandoc
from
'
./plugins/pandoc
'
;
import
spy
from
'
./plugins/spy
'
;
import
wkhtmltopdf
from
'
./plugins/wkhtmltopdf
'
;
import
revealjs
from
'
./revealjs
'
;
export
const
clean
=
()
=>
del
(
`
${
DEST_DIR
}
/**`
,
{
force
:
true
});
...
...
@@ -28,7 +29,7 @@ export const pdf = () => src(PDF_GLOB).pipe(wkhtmltopdf()).pipe(dest(DEST_DIR)).
export
const
build
=
series
(
clean
,
parallel
(
build_
revealjs
,
assets
,
prez
,
graphs
),
parallel
(
revealjs
,
assets
,
prez
,
graphs
),
pdf
);
...
...
gulpfile.esm.js/dev.js
View file @
89cddb88
import
{
ASSET_GLOB
,
DEST_DIR
,
GRAPH_GLOB
,
PREZ_GLOB
}
from
"
./config
"
;
import
build
,
{
assets
,
graphs
,
pdf
,
prez
}
from
"
./build
"
;
import
{
parallel
,
series
,
src
,
watch
}
from
"
gulp
"
;
import
server
from
"
gulp-server-livereload
"
;
import
{
watch_revealjs
}
from
"
./revealjs
"
;
import
{
parallel
,
series
,
src
,
watch
}
from
'
gulp
'
;
import
server
from
'
gulp-server-livereload
'
;
import
build
,
{
assets
,
graphs
,
pdf
,
prez
}
from
'
./build
'
;
import
{
ASSET_GLOB
,
DEST_DIR
,
GRAPH_GLOB
,
PREZ_GLOB
}
from
'
./config
'
;
import
revealjs
from
'
./revealjs
'
;
const
serve
=
()
=>
{
src
(
DEST_DIR
).
pipe
(
...
...
@@ -24,15 +25,14 @@ const watch_pdf = () => watch(`${DEST_DIR}/**/*.{html,svg,jpg,gif,png}`, pdf);
export
const
dev
=
series
(
build
,
revealjs
,
parallel
(
serve
,
watch_prez
,
watch_assets
,
watch_graphs
,
watch_pdf
,
watch_revealjs
)
);
export
default
dev
;
gulpfile.esm.js/revealjs.js
View file @
89cddb88
import
*
as
revealJS
from
"
@inrae/reveal.js/gulpfile.esm
"
;
import
{
dest
,
lastRun
,
parallel
,
series
,
src
,
watch
}
from
"
gulp
"
;
import
{
DEST_DIR
,
REVEALJS_URL
}
from
"
./config
"
;
import
logger
from
"
gulplog
"
;
import
{
magenta
}
from
"
gulp-cli/lib/shared/ansi
"
;
import
path
from
"
path
"
;
import
spy
from
"
./plugins/spy
"
;
const
noop
=
()
=>
Promise
.
resolve
(
false
);
export
const
[
build_revealjs
,
watch_revealjs
]
=
(
function
(
url
)
{
if
(
url
.
startsWith
(
"
http
"
))
{
import
{
dest
,
lastRun
,
src
}
from
'
gulp
'
;
import
{
magenta
}
from
'
gulp-cli/lib/shared/ansi
'
;
import
logger
from
'
gulplog
'
;
import
path
from
'
path
'
;
import
{
DEST_DIR
,
REVEALJS_URL
}
from
'
./config
'
;
import
spy
from
'
./plugins/spy
'
;
let
revealjs
=
()
=>
Promise
.
resolve
(
false
)
if
(
REVEALJS_URL
.
startsWith
(
"
http
"
))
{
logger
.
info
(
`Using remote reveal.js at
${
magenta
(
REVEALJS_URL
)}
($REVEALJS_URL)`
);
return
[
noop
,
noop
];
}
const
_SRC_DIR
=
path
.
normalize
(
`
${
__dirname
}
/../node_modules/@inrae/reveal.js/public`
);
}
else
{
const
_SRC_DIR
=
path
.
normalize
(
`
${
__dirname
}
/../node_modules/@devatscience/reveal.js`
);
const
SRC
=
`
${
_SRC_DIR
}
/**`
;
const
DST
=
path
.
normalize
(
DEST_DIR
+
"
/
"
+
url
);
const
DST
=
path
.
normalize
(
DEST_DIR
+
"
/
"
+
REVEALJS_URL
);
logger
.
info
(
`Using local
${
DEST_DIR
}
/
${
magenta
(
path
.
relative
(
DEST_DIR
,
DST
))}
from
${
path
.
relative
(
__dirname
+
'
/..
'
,
_SRC_DIR
+
'
/..
'
)}
($REVEALJS_URL)`
);
const
copy_revealjs
=
()
=>
src
(
SRC
,
{
since
:
lastRun
(
copy_revealjs
)
}).
pipe
(
dest
(
DST
)).
pipe
(
spy
());
const
_watch_revealjs
=
()
=>
watch
(
SRC
,
copy_revealjs
);
revealjs
=
()
=>
src
([
SRC
,
"
!**/package.json
"
],
{
since
:
lastRun
(
revealjs
)
}).
pipe
(
dest
(
DST
)).
pipe
(
spy
());
logger
.
info
(
`Building local
${
DEST_DIR
}
/
${
magenta
(
path
.
relative
(
DEST_DIR
,
DST
))}
from
${
path
.
relative
(
__dirname
+
'
/..
'
,
_SRC_DIR
+
'
/..
'
)}
($REVEALJS_URL)`
);
}
return
[
series
(
revealJS
.
build
,
copy_revealjs
),
parallel
(
revealJS
.
dev
,
_watch_revealjs
),
];
})(
REVEALJS_URL
);
export
default
revealjs
;
package-lock.json
View file @
89cddb88
This diff is collapsed.
Click to expand it.
package.json
View file @
89cddb88
...
...
@@ -24,7 +24,7 @@
"node"
:
">=12 <14"
},
"dependencies"
:
{
"@
inrae/reveal.js"
:
"git+https://gitlab.irstea.fr/pole-is/tools/reveal.js.git#semver:^2
.0"
,
"
@
devatscience/reveal.js
"
:
"
^2.0
.0
"
,
"
del
"
:
"
^5.1.0
"
,
"
esm
"
:
"
^3.2.25
"
,
"
gulp
"
:
"
^4.0.2
"
,
...
...
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