Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
etimberg committed May 23, 2020
1 parent e683a16 commit 99d147f
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions gulpfile.js
Expand Up @@ -10,7 +10,6 @@ const pkg = require('./package.json');

const argv = require('yargs')
.option('output', {alias: 'o', default: 'dist'})
.option('samples-dir', {default: 'samples'})
.option('docs-dir', {default: 'docs'})
.option('www-dir', {default: 'www'})
.argv;
Expand Down Expand Up @@ -54,7 +53,6 @@ gulp.task('test', (done) => {

gulp.task('lint', () => {
const files = [
'samples/**/*.js',
'src/**/*.js',
'test/**/*.js',
'*.js'
Expand All @@ -73,39 +71,6 @@ gulp.task('docs', () => {
return run('vuepress', [mode, 'docs', args]);
});

gulp.task('samples', () => {
// since we moved the dist files one folder up (package root), we need to rewrite
// samples src="../dist/ to src="../ and then copy them in the /samples directory.
const out = path.join(argv.output, argv.samplesDir);
return gulp.src('samples/**/*', {base: 'samples'})
.pipe(streamify(replace(/src="((?:\.\.\/)+)dist\//g, 'src="$1', {skipBinary: true})))
.pipe(gulp.dest(out));
});

gulp.task('package', gulp.series(gulp.parallel('build', 'samples'), () => {
const out = argv.output;
const streams = merge(
gulp.src(path.join(out, argv.samplesDir, '**/*'), {base: out}),
gulp.src([path.join(out, '*.js'), 'LICENSE.md'])
);

return streams
.pipe(zip(pkg.name + '.zip'))
.pipe(gulp.dest(out));
}));

gulp.task('netlify', gulp.series(gulp.parallel('build', 'docs', 'samples'), () => {
const root = argv.output;
const out = path.join(root, argv.wwwDir);
const streams = merge(
gulp.src(path.join(root, argv.docsDir, '**/*'), {base: path.join(root, argv.docsDir)}),
gulp.src(path.join(root, argv.samplesDir, '**/*'), {base: root}),
gulp.src(path.join(root, '*.js'))
);

return streams.pipe(gulp.dest(out));
}));

gulp.task('bower', () => {
const json = JSON.stringify({
name: pkg.name,
Expand Down

0 comments on commit 99d147f

Please sign in to comment.