Merge branch 'master' into 68-sl-formatting
This commit is contained in:
commit
1330317f1d
112 changed files with 3368 additions and 741 deletions
14
gulpfile.js
14
gulpfile.js
|
|
@ -81,6 +81,7 @@ var paths = {
|
|||
.concat('css/*.css'),
|
||||
images: mainNpmFiles().filter((f) => RegExp('.*.+(png|gif|svg)', 'i').test(f)),
|
||||
fonts: mainNpmFiles().filter((f) => RegExp('font-awesome/fonts/.*', 'i').test(f)),
|
||||
changelog: 'CHANGELOG.md',
|
||||
locales: 'locales/*.json',
|
||||
layers: 'layers/**/*.geojson',
|
||||
layersDestName: 'layers.js',
|
||||
|
|
@ -189,7 +190,8 @@ gulp.task('boundaries', function () {
|
|||
});
|
||||
|
||||
gulp.task('changelog', function (cb) {
|
||||
var content = 'BR.changelog = `' + marked(fs.readFileSync('./CHANGELOG.md', 'utf-8')) + '`';
|
||||
var content = 'BR.changelog = `' + marked(fs.readFileSync(paths.changelog, 'utf-8')) + '`';
|
||||
content = content.replace(/<h1.*<\/h1>/i, '');
|
||||
fs.writeFile(paths.dest + '/changelog.js', content, cb);
|
||||
});
|
||||
|
||||
|
|
@ -207,6 +209,7 @@ gulp.task('watch', function () {
|
|||
remember.forget('scripts', event.path);
|
||||
}
|
||||
});
|
||||
gulp.watch(paths.changelog, gulp.series('changelog', 'reload'));
|
||||
gulp.watch(paths.locales, gulp.series('locales', 'reload'));
|
||||
gulp.watch(paths.styles, gulp.series('styles', 'reload'));
|
||||
gulp.watch(paths.layersConfig, gulp.series('layers_config', 'reload'));
|
||||
|
|
@ -283,13 +286,16 @@ gulp.task('bump:json', function () {
|
|||
});
|
||||
|
||||
gulp.task('bump:html', function () {
|
||||
const version = nextVersion || pkg.version;
|
||||
return gulp
|
||||
.src('./index.html')
|
||||
.pipe(replace(/<sup class="version">(.*)<\/sup>/, '<sup class="version">' + pkg.version + '</sup>'))
|
||||
.pipe(replace(/BR.version = '(.*?)';/, "BR.version = '" + pkg.version + "';"))
|
||||
.pipe(replace(/<sup class="version">(.*)<\/sup>/, '<sup class="version">' + version + '</sup>'))
|
||||
.pipe(replace(/BR.version = '(.*?)';/, "BR.version = '" + version + "';"))
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('bump', gulp.series('bump:json', 'bump:html'));
|
||||
|
||||
gulp.task('release:commit', function () {
|
||||
return gulp.src(['./index.html', './package.json']).pipe(git.commit('release: ' + nextVersion));
|
||||
});
|
||||
|
|
@ -468,7 +474,7 @@ gulp.task(
|
|||
'release',
|
||||
gulp.series(
|
||||
'release:init',
|
||||
'bump:json',
|
||||
'bump',
|
||||
'release:commit',
|
||||
'release:tag',
|
||||
'release:push',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue