change directory
This commit is contained in:
parent
cd43d44d58
commit
0428c1dc82
38
gulpfile.js
38
gulpfile.js
|
@ -8,7 +8,7 @@ var reload = browserSync.reload;
|
||||||
|
|
||||||
gulp.task('styles', function () {
|
gulp.task('styles', function () {
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'app/styles/**/*.css'
|
'src/styles/**/*.css'
|
||||||
]).pipe($.autoprefixer({browsers: ['> 1%', 'last 2 versions', 'Firefox ESR']}))
|
]).pipe($.autoprefixer({browsers: ['> 1%', 'last 2 versions', 'Firefox ESR']}))
|
||||||
.pipe(gulp.dest('.tmp/styles'))
|
.pipe(gulp.dest('.tmp/styles'))
|
||||||
.pipe(reload({stream: true}));
|
.pipe(reload({stream: true}));
|
||||||
|
@ -16,7 +16,7 @@ gulp.task('styles', function () {
|
||||||
|
|
||||||
gulp.task('scripts', function () {
|
gulp.task('scripts', function () {
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'app/scripts/**/*.js'
|
'src/scripts/**/*.js'
|
||||||
]).pipe($.plumber())
|
]).pipe($.plumber())
|
||||||
.pipe(gulp.dest('.tmp/scripts'))
|
.pipe(gulp.dest('.tmp/scripts'))
|
||||||
.pipe(reload({stream: true}));
|
.pipe(reload({stream: true}));
|
||||||
|
@ -24,17 +24,17 @@ gulp.task('scripts', function () {
|
||||||
|
|
||||||
gulp.task('lint', function () {
|
gulp.task('lint', function () {
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'app/scripts/**/*.js'
|
'src/scripts/**/*.js'
|
||||||
]).pipe(reload({stream: true, once: true}))
|
]).pipe(reload({stream: true, once: true}))
|
||||||
.pipe($.eslint({fix: true}))
|
.pipe($.eslint({fix: true}))
|
||||||
.pipe($.eslint.format())
|
.pipe($.eslint.format())
|
||||||
.pipe($.if(!browserSync.active, $.eslint.failAfterError()))
|
.pipe($.if(!browserSync.active, $.eslint.failAfterError()))
|
||||||
.pipe(gulp.dest('app/scripts'));
|
.pipe(gulp.dest('src/scripts'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('html', ['styles', 'scripts'], function () {
|
gulp.task('html', ['styles', 'scripts'], function () {
|
||||||
return gulp.src('app/*.html')
|
return gulp.src('src/*.html')
|
||||||
.pipe($.useref({searchPath: ['.tmp', 'app', '.']}))
|
.pipe($.useref({searchPath: ['.tmp', 'src', '.']}))
|
||||||
.pipe($.if('js/*.js', $.replace(/\/\/# sourceMappingURL=.*/g, '')))
|
.pipe($.if('js/*.js', $.replace(/\/\/# sourceMappingURL=.*/g, '')))
|
||||||
.pipe($.if('css/*.css', $.replace(/\/\*# sourceMappingURL=.* \*\/$/g, '')))
|
.pipe($.if('css/*.css', $.replace(/\/\*# sourceMappingURL=.* \*\/$/g, '')))
|
||||||
.pipe($.if(['js/moment-with-locales-*.min.js', 'js/plugins.min.js', 'js/aria-ng.min.js'], $.uglify({preserveComments: 'license'})))
|
.pipe($.if(['js/moment-with-locales-*.min.js', 'js/plugins.min.js', 'js/aria-ng.min.js'], $.uglify({preserveComments: 'license'})))
|
||||||
|
@ -44,18 +44,18 @@ gulp.task('html', ['styles', 'scripts'], function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('langs', function () {
|
gulp.task('langs', function () {
|
||||||
return gulp.src('app/langs/**/*')
|
return gulp.src('src/langs/**/*')
|
||||||
.pipe(gulp.dest('dist/langs'));
|
.pipe(gulp.dest('dist/langs'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('views', function () {
|
gulp.task('views', function () {
|
||||||
return gulp.src('app/views/**/*')
|
return gulp.src('src/views/**/*')
|
||||||
.pipe($.htmlmin({collapseWhitespace: true}))
|
.pipe($.htmlmin({collapseWhitespace: true}))
|
||||||
.pipe(gulp.dest('dist/views'));
|
.pipe(gulp.dest('dist/views'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('images', function () {
|
gulp.task('images', function () {
|
||||||
return gulp.src('app/imgs/**/*')
|
return gulp.src('src/imgs/**/*')
|
||||||
.pipe(gulp.dest('dist/imgs'));
|
.pipe(gulp.dest('dist/imgs'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ gulp.task('fonts', function () {
|
||||||
|
|
||||||
gulp.task('extras', function () {
|
gulp.task('extras', function () {
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'app/*.*',
|
'src/*.*',
|
||||||
'!app/*.html'
|
'!src/*.html'
|
||||||
], {
|
], {
|
||||||
dot: true
|
dot: true
|
||||||
}).pipe(gulp.dest('dist'));
|
}).pipe(gulp.dest('dist'));
|
||||||
|
@ -83,7 +83,7 @@ gulp.task('serve', ['styles', 'scripts', 'fonts'], function () {
|
||||||
notify: false,
|
notify: false,
|
||||||
port: 9000,
|
port: 9000,
|
||||||
server: {
|
server: {
|
||||||
baseDir: ['.tmp', 'app'],
|
baseDir: ['.tmp', 'src'],
|
||||||
routes: {
|
routes: {
|
||||||
'/bower_components': 'bower_components'
|
'/bower_components': 'bower_components'
|
||||||
}
|
}
|
||||||
|
@ -91,16 +91,16 @@ gulp.task('serve', ['styles', 'scripts', 'fonts'], function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.watch([
|
gulp.watch([
|
||||||
'app/*.html',
|
'src/*.html',
|
||||||
'app/langs/*.json',
|
'src/langs/*.json',
|
||||||
'app/views/*.html',
|
'src/views/*.html',
|
||||||
'app/imgs/**/*',
|
'src/imgs/**/*',
|
||||||
'.tmp/fonts/**/*'
|
'.tmp/fonts/**/*'
|
||||||
]).on('change', reload);
|
]).on('change', reload);
|
||||||
|
|
||||||
gulp.watch('app/styles/**/*.css', ['styles']);
|
gulp.watch('src/styles/**/*.css', ['styles']);
|
||||||
gulp.watch('app/scripts/**/*.js', ['scripts']);
|
gulp.watch('src/scripts/**/*.js', ['scripts']);
|
||||||
gulp.watch('app/fonts/**/*', ['fonts']);
|
gulp.watch('src/fonts/**/*', ['fonts']);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('serve:dist', function () {
|
gulp.task('serve:dist', function () {
|
||||||
|
|
Reference in a new issue