Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F12660456
gulpfile.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
gulpfile.js
View Options
"use strict"
;
var
gulp
=
require
(
"gulp"
),
minifycss
=
require
(
"gulp-clean-css"
),
concat
=
require
(
"gulp-concat"
),
header
=
require
(
"gulp-header"
),
buffer
=
require
(
"vinyl-buffer"
),
pkg
=
require
(
"./package.json"
),
debug
=
require
(
"gulp-debug"
),
browserify
=
require
(
"browserify"
),
source
=
require
(
"vinyl-source-stream"
),
rename
=
require
(
"gulp-rename"
);
var
banner
=
[
"/**"
,
" * <%= pkg.name %> v<%= pkg.version %>"
,
" * Copyright <%= pkg.company %>"
,
" * @link <%= pkg.homepage %>"
,
" * @license <%= pkg.license %>"
,
" */"
,
""
,
].
join
(
"\n"
);
function
taskBrowserify
(
opts
)
{
return
browserify
(
"./src/js/simplemde.js"
,
opts
).
bundle
();
}
gulp
.
task
(
"browserify:debug"
,
[],
function
()
{
return
taskBrowserify
({
debug
:
true
,
standalone
:
"SimpleMDE"
})
.
pipe
(
source
(
"simplemde.debug.js"
))
.
pipe
(
buffer
())
.
pipe
(
header
(
banner
,
{
pkg
:
pkg
}))
.
pipe
(
gulp
.
dest
(
"./debug/"
));
});
gulp
.
task
(
"browserify"
,
[],
function
()
{
return
taskBrowserify
({
standalone
:
"SimpleMDE"
})
.
pipe
(
source
(
"simplemde.js"
))
.
pipe
(
buffer
())
.
pipe
(
header
(
banner
,
{
pkg
:
pkg
}))
.
pipe
(
gulp
.
dest
(
"./debug/"
));
});
gulp
.
task
(
"scripts"
,
[
"browserify:debug"
,
"browserify"
],
function
()
{
var
js_files
=
[
"./debug/simplemde.js"
];
return
gulp
.
src
(
js_files
)
.
pipe
(
concat
(
"simplemde.min.js"
))
.
pipe
(
buffer
())
.
pipe
(
header
(
banner
,
{
pkg
:
pkg
}))
.
pipe
(
gulp
.
dest
(
"./dist/"
));
});
gulp
.
task
(
"styles"
,
[],
function
()
{
var
css_files
=
[
"./node_modules/@sealcode/sealcodemirror/lib/codemirror.css"
,
"./src/css/*.css"
,
"./node_modules/codemirror-spell-checker/src/css/spell-checker.css"
,
];
return
gulp
.
src
(
css_files
)
.
pipe
(
concat
(
"simplemde.css"
))
.
pipe
(
buffer
())
.
pipe
(
header
(
banner
,
{
pkg
:
pkg
}))
.
pipe
(
gulp
.
dest
(
"./debug/"
))
.
pipe
(
minifycss
())
.
pipe
(
rename
(
"simplemde.min.css"
))
.
pipe
(
buffer
())
.
pipe
(
header
(
banner
,
{
pkg
:
pkg
}))
.
pipe
(
gulp
.
dest
(
"./dist/"
));
});
gulp
.
task
(
"default"
,
[
"scripts"
,
"styles"
]);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 15:39 (7 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1083256
Default Alt Text
gulpfile.js (1 KB)
Attached To
Mode
rMDE sealmde-markdown-editor
Attached
Detach File
Event Timeline
Log In to Comment