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
[*]
indent_style = tab
indent_style = space
indent_size = 4
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
[{bower.json,package.json,.travis.yml}]
indent_style = space
[{*.json,*.yml,*.toml}]
indent_size = 2
......@@ -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:
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:
npm run publish
npm run publish
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();
gulp.task('prepare', () => {
const shower = gulp.src([
'**',
'!docs{,/**}',
'!node_modules{,/**}',
'!prepared{,/**}',
'!CONTRIBUTING.md',
'!LICENSE.md',
'!README.md',
'!gulpfile.js',
'!netlify.toml',
'!package.json',
'!package-lock.json'
])
.pipe(replace(
/(<link rel="stylesheet" href=")(node_modules\/shower-)([^\/]*)\/(.*\.css">)/g,
'$1shower/themes/$3/$4', { skipBinary: true }
))
.pipe(replace(
/(<script src=")(node_modules\/shower-core\/)(shower.min.js"><\/script>)/g,
'$1shower/$3', { skipBinary: true }
));
const shower = gulp.src([
'**',
'!docs{,/**}',
'!node_modules{,/**}',
'!prepared{,/**}',
'!CONTRIBUTING.md',
'!LICENSE.md',
'!README.md',
'!gulpfile.js',
'!netlify.toml',
'!package.json',
'!package-lock.json'
])
.pipe(replace(
/(<link rel="stylesheet" href=")(node_modules\/shower-)([^\/]*)\/(.*\.css">)/g,
'$1shower/themes/$3/$4', { skipBinary: true }
))
.pipe(replace(
/(<script src=")(node_modules\/shower-core\/)(shower.min.js"><\/script>)/g,
'$1shower/$3', { skipBinary: true }
));
const core = gulp.src([
'shower.min.js'
], {
cwd: 'node_modules/shower-core'
})
.pipe(rename( (path) => {
path.dirname = 'shower/' + path.dirname;
}));
const core = gulp.src([
'shower.min.js'
], {
cwd: 'node_modules/shower-core'
})
.pipe(rename( (path) => {
path.dirname = 'shower/' + path.dirname;
}));
const material = gulp.src([
'**', '!package.json'
], {
cwd: 'node_modules/shower-material'
})
.pipe(rename( (path) => {
path.dirname = 'shower/themes/material/' + path.dirname;
}))
const material = gulp.src([
'**', '!package.json'
], {
cwd: 'node_modules/shower-material'
})
.pipe(rename( (path) => {
path.dirname = 'shower/themes/material/' + path.dirname;
}))
const ribbon = gulp.src([
'**', '!package.json'
], {
cwd: 'node_modules/shower-ribbon'
})
.pipe(rename( (path) => {
path.dirname = 'shower/themes/ribbon/' + path.dirname;
}));
const ribbon = gulp.src([
'**', '!package.json'
], {
cwd: 'node_modules/shower-ribbon'
})
.pipe(rename( (path) => {
path.dirname = 'shower/themes/ribbon/' + path.dirname;
}));
const themes = merge(material, ribbon)
.pipe(replace(
/(<script src=")(\/shower-core\/)(shower.min.js"><\/script>)/,
'$1../../$3', { skipBinary: true }
));
const themes = merge(material, ribbon)
.pipe(replace(
/(<script src=")(\/shower-core\/)(shower.min.js"><\/script>)/,
'$1../../$3', { skipBinary: true }
));
return merge(shower, core, themes)
.pipe(gulp.dest('prepared'));
return merge(shower, core, themes)
.pipe(gulp.dest('prepared'));
});
gulp.task('clean', () => {
return del('prepared/**');
return del('prepared/**');
});
gulp.task('zip', () => {
return gulp.src('prepared/**')
.pipe(zip('archive.zip'))
.pipe(gulp.dest('.'));
return gulp.src('prepared/**')
.pipe(zip('archive.zip'))
.pipe(gulp.dest('.'));
});
gulp.task('upload', () => {
return pages.publish('prepared')
return pages.publish('prepared')
});
gulp.task('archive', gulp.series(
'prepare',
'zip',
'clean'
'prepare',
'zip',
'clean'
));
gulp.task('publish', gulp.series(
'prepare',
'upload',
'clean'
'prepare',
'upload',
'clean'
));
gulp.task('serve', () => {
sync.init({
ui: false,
notify: false,
port: 3000,
server: {
baseDir: '.'
}
});
gulp.watch('index.html').on('change', () => {
sync.reload();
});
sync.init({
ui: false,
notify: false,
port: 3000,
server: {
baseDir: '.'
}
});
gulp.watch('index.html').on('change', () => {
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