Skip to content

Commit

Permalink
Fix Bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcastilloc committed May 27, 2020
1 parent 3445c78 commit be3af8e
Show file tree
Hide file tree
Showing 13 changed files with 851 additions and 532 deletions.
1 change: 1 addition & 0 deletions deployToMikrotik.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scp -r dist/hotspot/ admin@192.168.0.102:/
88 changes: 61 additions & 27 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,77 @@
const { src, dest, watch, series } = require('gulp')
const {
src,
dest,
watch,
series
} = require('gulp')
const pug = require('gulp-pug')
const sass = require('gulp-sass')
const htmlmin = require('gulp-htmlmin');
const browserSync = require('browser-sync').create()
const minify = require('gulp-minify');

// Compile pug files into HTML
function html() {
return src('src/hotspot/**/*')
.pipe(pug())
.pipe(dest('dist/hotspot/'))
return src('src/hotspot/**/*.pug')
.pipe(pug())
.pipe(dest('dist/hotspot/'))
}
// // Copy assets
// // add xml copy to dist dir
// function assets() {
// return src('src/assets/**/*')
// .pipe(dest('dist/hotspot/assets'))
// }

function minifiedhtml() {
return src('dist/hotspot/**/*.html')
.pipe(htmlmin({
collapseWhitespace: true
}))
.pipe(dest('dist/hotspot/'))
}

// Copy assets
// add xml copy to dist dir
function assets() {
return src('src/assets/**/*')
.pipe(dest('dist/hotspot/assets'))
}

//Compile sass files into CSS
function styles() {
return src('src/scss/theme.scss')
.pipe(sass({
includePaths: ['src/scss'],
errLogToConsole: true,
outputStyle: 'compressed',
onError: browserSync.notify
}))
.pipe(dest('dist/hotspot/assets/css'))
.pipe(browserSync.stream())
return src('src/scss/theme.scss')
.pipe(sass({
includePaths: ['src/scss'],
errLogToConsole: true,
outputStyle: 'compressed',
onError: browserSync.notify
}))
.pipe(dest('dist/hotspot/assets/css'))
}

//Compile sass files into CSS
function minjs() {
return src('src/assets/pagos/*.js')
.pipe(minify({
ext: {
src: '-debug.js',
min: '.js'
},
exclude: ['vue.js'],
ignoreFiles: ['.combo.js', '-min.js']
}))
.pipe(dest('dist/hotspot/assets/pagos'))
}

// Serve and watch sass/pug files for changes
function watchAndServe() {
browserSync.init({
server: 'dist/hotspot/',
})

watch('src/sass/**/*.scss', styles)
watch('src/**/*', html)
watch('dist/hotspot/*.html').on('change', browserSync.reload)
browserSync.init({
server: 'dist/hotspot/',
})
watch('src/sass/**/*', styles)
watch('src/assets/pagos/**/*', minjs)
watch(['src/**/*.pug', 'src/**/*.html'], html, minifiedhtml)
watch('dist/hotspot/**/*.*').on('change', browserSync.reload)
}

exports.html = html
exports.minifiedhtml = minifiedhtml
exports.js = minjs
exports.styles = styles
exports.watch = watchAndServe
exports.default = series(html, styles, watchAndServe)
exports.default = series(html, minifiedhtml, assets, minjs, styles, watchAndServe)
118 changes: 0 additions & 118 deletions loginpin.html

This file was deleted.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@
"gulp": "^4.0.2",
"gulp-pug": "^4.0.1",
"gulp-sass": "^4.1.0"
},
"dependencies": {
"gulp-htmlmin": "^5.0.1",
"gulp-minify": "^3.1.0",
"gulp-sftp": "^0.1.5"
}
}
45 changes: 0 additions & 45 deletions sftp-config.json

This file was deleted.

Binary file added src/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit be3af8e

Please sign in to comment.