Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Fixed a small typo #292

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ To modify this configuration, create a `development.yaml` or a `production.yaml`
url: 'http://myDomain.com'
```

Node that Uptime works great behind a proxy - it uses the `http_proxy` environment variable transparently.
Note that Uptime works great behind a proxy - it uses the `http_proxy` environment variable transparently.

Architecture
------------
Expand Down
106 changes: 106 additions & 0 deletions app/dashboard/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
var gulp = require('gulp');
var watch = require('gulp-watch');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var prefix = require('gulp-autoprefixer');
var plumber = require('gulp-plumber');
var livereload = require('gulp-livereload');
var gulpFilter = require('gulp-filter');
var minifyCSS = require('gulp-minify-css');
var rename = require('gulp-rename');
var ejs = require('gulp-ejs-precompiler');
var insert = require('gulp-insert');
var local = false;

/**
* Generates CSS from SASS
* @return {[type]} [description]
*/
gulp.task('sass', function () {
theTask = gulp.src('./src/scss/style.scss')
.pipe(plumber())
.pipe(sass({
outputStyle: 'compressed'
}))
.pipe(prefix('last 2 version'))
.pipe(gulp.dest('./public/css'));

if (local)
theTask.pipe(livereload());
});

/**
* Copy images
* @return {[type]} [description]
*/
gulp.task('img', function () {
theTask = gulp.src('./src/img/**/*')
.pipe(gulp.dest('./public/img'));

if (local)
theTask.pipe(livereload());
});

/**
* Concat and uglify JS files
* @return {[type]} [description]
*/
gulp.task('js', function () {
theTask = gulp.src('./src/js/*.js')
.pipe(concat('scripts.js'))
.pipe(uglify())
.pipe(gulp.dest('./public/js'));

if (local)
theTask.pipe(livereload());
});

/**
* Concat and uglify templates
* @return {[type]} [description]
*/
gulp.task('ejs', function () {
gulp.src('./src/tpl/**/*.ejs')
.pipe(ejs({
client: true
}))
.pipe(uglify())
.pipe(concat('templates.js'))
.pipe(insert.prepend('window.templates = {};'+"\n"))
.pipe(gulp.dest('./public/js'));

if (local)
theTask.pipe(livereload());
});

/**
* Watch files and run tasks if they change
* @return {[type]} [description]
*/
gulp.task('watch', function () {
local = true;
livereload.listen();

watch('./src/scss/**/*.{css,scss}', function (files, cb) {
gulp.start('sass', cb);
});

watch('./src/img/**/*', function (files, cb) {
gulp.start('img', cb);
});

watch('./src/js/**/*', function (files, cb) {
gulp.start('js', cb);
});

watch('./src/tpl/**/*.html', function (files, cb) {
gulp.start('ejs', cb);
});
});


/**
* The default task (called when you run `gulp`)
*/
gulp.task('default', [ 'js', 'sass', 'img', 'ejs' ]);
43 changes: 43 additions & 0 deletions app/dashboard/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "uptime-public",
"version": "3.2.0",
"description": "The public facing part of the Uptime dashboard",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/phanan/uptime.git"
},
"keywords": [
"uptime",
"node",
"gulp"
],
"author": "fzaninotto, phanan",
"license": "MIT",
"bugs": {
"url": "https://github.com/phanan/uptime/issues"
},
"homepage": "https://github.com/phanan/uptime",
"devDependencies": {
"can-compile": "^0.7.1",
"grunt": "^0.4.5",
"gulp": "^3.8.10",
"gulp-autoprefixer": "^2.1.0",
"gulp-concat": "^2.4.3",
"gulp-ejs-precompiler": "^0.2.0",
"gulp-filter": "^2.0.0",
"gulp-imagemin": "^2.1.0",
"gulp-insert": "^0.4.0",
"gulp-livereload": "^3.5.0",
"gulp-minify-css": "^0.4.2",
"gulp-plumber": "^0.6.6",
"gulp-rename": "^1.2.0",
"gulp-sass": "^1.3.2",
"gulp-uglify": "^1.1.0",
"gulp-util": "^3.0.2",
"gulp-watch": "^4.0.3"
}
}
1 change: 1 addition & 0 deletions app/dashboard/public/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed app/dashboard/public/favicon_red.ico
Binary file not shown.
Binary file removed app/dashboard/public/images/external-link-ltr-icon.png
Binary file not shown.
Binary file added app/dashboard/public/img/favicon_red.ico
Binary file not shown.
181 changes: 0 additions & 181 deletions app/dashboard/public/javascripts/dateNavigation.js

This file was deleted.

4 changes: 0 additions & 4 deletions app/dashboard/public/javascripts/jquery.min.js

This file was deleted.

5 changes: 5 additions & 0 deletions app/dashboard/public/js/scripts.js

Large diffs are not rendered by default.

Loading