Commit bce8d326 authored by Vadim Makeev's avatar Vadim Makeev

Moving from tabs to spaces

parent 9879ceb6
# EditorConfig is awesome: http://EditorConfig.org
root = true root = true
[*] [*]
indent_style = tab indent_style = space
indent_size = 4 indent_size = 4
end_of_line = lf end_of_line = lf
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
charset = utf-8 charset = utf-8
[{bower.json,package.json,.travis.yml}] [{*.json,*.yml,*.toml}]
indent_style = space
indent_size = 2 indent_size = 2
...@@ -37,11 +37,11 @@ By doing this you would get a GitHub repo linked with Netlify in a way any chang ...@@ -37,11 +37,11 @@ By doing this you would get a GitHub repo linked with Netlify in a way any chang
Once you’re done you can build a clean copy of your slides: Once you’re done you can build a clean copy of your slides:
npm run prepare npm run prepare
And you’ll find your presentation in `prepared` folder with only needed files in it. You can also run `npm run archive` to get the same files in `archive.zip`. But there’s more! You can easily publish your presentation online by running: And you’ll find your presentation in `prepared` folder with only needed files in it. You can also run `npm run archive` to get the same files in `archive.zip`. But there’s more! You can easily publish your presentation online by running:
npm run publish npm run publish
And you’ll have your slides published to `http://USER.github.io/REPO/`. And you’ll have your slides published to `http://USER.github.io/REPO/`.
......
This diff is collapsed.
...@@ -9,102 +9,102 @@ const sync = require('browser-sync').create(); ...@@ -9,102 +9,102 @@ const sync = require('browser-sync').create();
gulp.task('prepare', () => { gulp.task('prepare', () => {
const shower = gulp.src([ const shower = gulp.src([
'**', '**',
'!docs{,/**}', '!docs{,/**}',
'!node_modules{,/**}', '!node_modules{,/**}',
'!prepared{,/**}', '!prepared{,/**}',
'!CONTRIBUTING.md', '!CONTRIBUTING.md',
'!LICENSE.md', '!LICENSE.md',
'!README.md', '!README.md',
'!gulpfile.js', '!gulpfile.js',
'!netlify.toml', '!netlify.toml',
'!package.json', '!package.json',
'!package-lock.json' '!package-lock.json'
]) ])
.pipe(replace( .pipe(replace(
/(<link rel="stylesheet" href=")(node_modules\/shower-)([^\/]*)\/(.*\.css">)/g, /(<link rel="stylesheet" href=")(node_modules\/shower-)([^\/]*)\/(.*\.css">)/g,
'$1shower/themes/$3/$4', { skipBinary: true } '$1shower/themes/$3/$4', { skipBinary: true }
)) ))
.pipe(replace( .pipe(replace(
/(<script src=")(node_modules\/shower-core\/)(shower.min.js"><\/script>)/g, /(<script src=")(node_modules\/shower-core\/)(shower.min.js"><\/script>)/g,
'$1shower/$3', { skipBinary: true } '$1shower/$3', { skipBinary: true }
)); ));
const core = gulp.src([ const core = gulp.src([
'shower.min.js' 'shower.min.js'
], { ], {
cwd: 'node_modules/shower-core' cwd: 'node_modules/shower-core'
}) })
.pipe(rename( (path) => { .pipe(rename( (path) => {
path.dirname = 'shower/' + path.dirname; path.dirname = 'shower/' + path.dirname;
})); }));
const material = gulp.src([ const material = gulp.src([
'**', '!package.json' '**', '!package.json'
], { ], {
cwd: 'node_modules/shower-material' cwd: 'node_modules/shower-material'
}) })
.pipe(rename( (path) => { .pipe(rename( (path) => {
path.dirname = 'shower/themes/material/' + path.dirname; path.dirname = 'shower/themes/material/' + path.dirname;
})) }))
const ribbon = gulp.src([ const ribbon = gulp.src([
'**', '!package.json' '**', '!package.json'
], { ], {
cwd: 'node_modules/shower-ribbon' cwd: 'node_modules/shower-ribbon'
}) })
.pipe(rename( (path) => { .pipe(rename( (path) => {
path.dirname = 'shower/themes/ribbon/' + path.dirname; path.dirname = 'shower/themes/ribbon/' + path.dirname;
})); }));
const themes = merge(material, ribbon) const themes = merge(material, ribbon)
.pipe(replace( .pipe(replace(
/(<script src=")(\/shower-core\/)(shower.min.js"><\/script>)/, /(<script src=")(\/shower-core\/)(shower.min.js"><\/script>)/,
'$1../../$3', { skipBinary: true } '$1../../$3', { skipBinary: true }
)); ));
return merge(shower, core, themes) return merge(shower, core, themes)
.pipe(gulp.dest('prepared')); .pipe(gulp.dest('prepared'));
}); });
gulp.task('clean', () => { gulp.task('clean', () => {
return del('prepared/**'); return del('prepared/**');
}); });
gulp.task('zip', () => { gulp.task('zip', () => {
return gulp.src('prepared/**') return gulp.src('prepared/**')
.pipe(zip('archive.zip')) .pipe(zip('archive.zip'))
.pipe(gulp.dest('.')); .pipe(gulp.dest('.'));
}); });
gulp.task('upload', () => { gulp.task('upload', () => {
return pages.publish('prepared') return pages.publish('prepared')
}); });
gulp.task('archive', gulp.series( gulp.task('archive', gulp.series(
'prepare', 'prepare',
'zip', 'zip',
'clean' 'clean'
)); ));
gulp.task('publish', gulp.series( gulp.task('publish', gulp.series(
'prepare', 'prepare',
'upload', 'upload',
'clean' 'clean'
)); ));
gulp.task('serve', () => { gulp.task('serve', () => {
sync.init({ sync.init({
ui: false, ui: false,
notify: false, notify: false,
port: 3000, port: 3000,
server: { server: {
baseDir: '.' baseDir: '.'
} }
}); });
gulp.watch('index.html').on('change', () => { gulp.watch('index.html').on('change', () => {
sync.reload(); sync.reload();
}); });
}); });
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment