2019-01-07 13:47:53 +00:00
|
|
|
const gulp = require('gulp');
|
|
|
|
const autoprefixer = require('gulp-autoprefixer');
|
|
|
|
const cssnano = require('gulp-cssnano');
|
|
|
|
const uglify = require('gulp-uglify');
|
|
|
|
const rename = require('gulp-rename');
|
|
|
|
const concat = require('gulp-concat');
|
|
|
|
const cache = require('gulp-cache');
|
|
|
|
const htmlmin = require('gulp-htmlmin');
|
|
|
|
const inject = require('gulp-inject');
|
|
|
|
const del = require('del');
|
|
|
|
const htmlreplace = require('gulp-html-replace');
|
2018-02-23 10:36:49 +00:00
|
|
|
|
|
|
|
const scss = require('gulp-scss');
|
|
|
|
const sass = require('gulp-sass');
|
|
|
|
const googleWebFonts = require('gulp-google-webfonts');
|
|
|
|
|
|
|
|
const fontOptions = { };
|
|
|
|
|
|
|
|
gulp.task('styles', function() {
|
|
|
|
return gulp.src(['node_modules/backbone.modal/backbone.modal.css', 'node_modules/backbone.modal/backbone.modal.theme.css'])
|
|
|
|
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
|
|
|
|
|
|
|
|
/* .pipe(gulp.dest('dist/css'))*/
|
|
|
|
/* .pipe(rename({suffix: '.min'}))*/
|
|
|
|
.pipe(concat('style.min.css'))
|
|
|
|
.pipe(cssnano())
|
|
|
|
.pipe(gulp.dest('live/css'));
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('copy', function() {
|
|
|
|
gulp.src(['src/img/**/*']).pipe(gulp.dest('live/img'));
|
2018-02-26 16:56:14 +00:00
|
|
|
gulp.src(['src/gfx/**/*']).pipe(gulp.dest('live/gfx'));
|
2018-02-23 10:36:49 +00:00
|
|
|
gulp.src(['src/browserconfig.xml', 'src/site.webmanifest', 'src/service-worker.js', 'src/bridger.js']).pipe(gulp.dest('live'));
|
2018-02-23 10:48:43 +00:00
|
|
|
gulp.src(['src/v1/index.html']).pipe(gulp.dest('live'));
|
2018-02-23 10:36:49 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('clean', function() {
|
|
|
|
return del(['live']);
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('customMUI', function() {
|
|
|
|
return gulp.src(['src/css/custom.scss'])
|
|
|
|
.pipe(sass({ 'outputStyle': 'compressed' }).on('error', sass.logError))
|
|
|
|
// .pipe(cssnano())
|
|
|
|
.pipe(rename('mui.custom.css'))
|
|
|
|
// .pipe(gulp.dest(`${dest}/css`));
|
|
|
|
.pipe(gulp.dest('live/css'));
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('vendor', function() {
|
|
|
|
return gulp.src([
|
|
|
|
'node_modules/muicss/dist/js/mui.min.js'
|
|
|
|
])
|
|
|
|
.pipe(concat('vendor.js'))
|
|
|
|
|
|
|
|
/* .pipe(uglify({ 'mangle': false }))*/
|
2019-01-07 13:47:53 +00:00
|
|
|
.pipe(gulp.dest('live/js'));
|
2018-02-23 10:36:49 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('fonts', function() {
|
|
|
|
return gulp.src('src/fonts.list')
|
|
|
|
.pipe(googleWebFonts(fontOptions))
|
2019-01-07 13:47:53 +00:00
|
|
|
.pipe(gulp.dest('live/fonts'))
|
2018-02-23 10:36:49 +00:00
|
|
|
;
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('gotham', function() {
|
|
|
|
gulp.src(['fonts/gotham.css']).pipe(gulp.dest('live/fonts'));
|
|
|
|
gulp.src(['fonts/GothamSSm-Black.otf', 'fonts/GothamSSm-Bold.otf', 'fonts/GothamSSm-Book.otf', 'fonts/GothamSSm-Light.otf', 'fonts/GothamSSm-Medium.otf']).pipe(gulp.dest('live/fonts'));
|
|
|
|
});
|
2018-03-25 01:13:25 +00:00
|
|
|
|
|
|
|
gulp.task('fujicons', function() {
|
|
|
|
gulp.src(['fonts/fujicons.css']).pipe(gulp.dest('live/fonts'));
|
|
|
|
gulp.src(['fonts/fujicons.ttf']).pipe(gulp.dest('live/fonts'));
|
|
|
|
});
|