-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3a2118f
Showing
27 changed files
with
540 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules/ | ||
bower_components/ | ||
src/lib/ | ||
build/**/*.map | ||
Thumbs.db | ||
npm-debug.log | ||
.ftppass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"preset": "google", | ||
"fileExtensions": [".js", "jscs"], | ||
|
||
"requireSemicolons": true, | ||
"requireParenthesesAroundIIFE": true, | ||
"maximumLineLength": 120, | ||
"validateIndentation": 4, | ||
"disallowTrailingComma": true, | ||
"disallowUnusedParams": true, | ||
|
||
"disallowSpacesInsideObjectBrackets": null, | ||
"disallowImplicitTypeConversion": ["string"], | ||
|
||
"safeContextKeyword": "_this", | ||
|
||
"jsDoc": { | ||
"checkAnnotations": "closurecompiler", | ||
"checkParamNames": true, | ||
"requireParamTypes": true, | ||
"checkRedundantParams": true, | ||
"checkReturnTypes": true, | ||
"checkRedundantReturns": true, | ||
"requireReturnTypes": true, | ||
"checkTypes": "capitalizedNativeCase", | ||
"checkRedundantAccess": true, | ||
"requireNewlineAfterDescription": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"browser": true, | ||
"node": true, | ||
|
||
"camelcase": true, | ||
"strict": false, | ||
"latedef": true, | ||
"maxlen": 120, | ||
"quotmark": "single", | ||
"undef": true, | ||
"unused": true, | ||
|
||
"eqnull": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"blocks": false, | ||
"brackets": { | ||
"expect": "never", | ||
"error": "true" | ||
}, | ||
"colons": { | ||
"expect": "never", | ||
"error": "true" | ||
}, | ||
"colors": false, | ||
"commaSpace": { | ||
"expect": "always", | ||
"error": "true" | ||
}, | ||
"commentSpace": { | ||
"expect": "always", | ||
"error": "true" | ||
}, | ||
"cssLiteral" : false, | ||
"depthLimit": false, | ||
"duplicates": true, | ||
"efficient": false, | ||
"extendPref": false, | ||
"globalDupe": false, | ||
"indentPref": false, | ||
"leadingZero": false, | ||
"none": false, | ||
"noImportant": true, | ||
"placeholders": false, | ||
"prefixVarsWithDollar": { | ||
"expect": "always", | ||
"error": "true" | ||
}, | ||
"semicolons": { | ||
"expect": "never", | ||
"error": true | ||
}, | ||
"sortOrder": false, | ||
"stackedProperties": { | ||
"expect": "never", | ||
"error": true | ||
}, | ||
"valid": true, | ||
"zeroUnits": { | ||
"expect": "never", | ||
"error": "true" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
tour-player | ||
=========== | ||
|
||
#### Getting started | ||
```git clone https://github.com/Tour-360/tour-player.git && cd tour-player``` | ||
|
||
```npm install -g gulp bower ``` | ||
|
||
```npm install ``` | ||
|
||
#### Build | ||
```gulp ``` | ||
|
||
#### Run server (browserSync) | ||
```gulp serve ``` | ||
|
||
#### FTP Deploy | ||
```gulp deploy``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "tour-player", | ||
"dependencies": { | ||
"threejs": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><head><meta charset=UTF-8><title>Слишком старый браузер</title></head><body><h3>Для отображения виртуального тура необходимо обновить браузер.</h3><a id=download target=_blank>Обновить</a></body> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Test" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | ||
<link rel="stylesheet" href="../build/css/main.css"> | ||
<script src="../build/js/main.js"></script><!-- async --> | ||
<title></title> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'); | ||
var del = require('del'); | ||
var autoprefixer = require('gulp-autoprefixer'); | ||
var cache = require('gulp-cache'); | ||
var concat = require('gulp-concat'); | ||
var imagemin = require('gulp-imagemin'); | ||
var jscs = require('gulp-jscs'); | ||
var jshint = require('gulp-jshint'); | ||
var minifyHTML = require('gulp-minify-html'); | ||
var size = require('gulp-size'); | ||
var sourcemaps = require('gulp-sourcemaps'); | ||
var sftp = require('gulp-sftp'); | ||
var stylint = require('gulp-stylint'); | ||
var stylus = require('gulp-stylus'); | ||
var uglify = require('gulp-uglify'); | ||
var mainBowerFiles = require('main-bower-files'); | ||
|
||
var browserSync = require('browser-sync').create(); | ||
|
||
// Удаляет все содержимое папки build и src/lib | ||
gulp.task('clean', function() { | ||
return del.sync(['build/**', 'src/lib/**']); | ||
}); | ||
|
||
// Очищает кэш файлов | ||
gulp.task('clear', function(done) { | ||
return cache.clearAll(done); | ||
}); | ||
|
||
// Конкатинирует и минифицирует JavaScript, создает sourseMap | ||
gulp.task('scripts', function() { | ||
return gulp.src(['src/js/**/*.js', 'src/lib/**/*.js']) | ||
.pipe(sourcemaps.init()) | ||
.pipe(concat('main.js')) | ||
.pipe(uglify({ | ||
preserveComments: 'some', | ||
outSourceMap: true | ||
})) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('build/js')) | ||
.pipe(size({title: 'scripts'})); | ||
}); | ||
|
||
// Конкатинирует и минифицирует CSS, STYLUS, создает sourseMap | ||
gulp.task('styles', function() { | ||
return gulp.src(['src/css/main.styl']) | ||
.pipe(sourcemaps.init()) | ||
.pipe(stylus({compress: true})) | ||
.pipe(autoprefixer({browsers: ['last 5 versions']})) | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest('build/css')) | ||
.pipe(size({title: 'styles'})); | ||
}); | ||
|
||
// Копирует шрифты | ||
gulp.task('fonts', function() { | ||
return gulp.src(['src/fonts/**']) | ||
.pipe(gulp.dest('build/fonts')) | ||
.pipe(size({title: 'fonts'})); | ||
}); | ||
|
||
// Сжимает изображения (gif, jpg, png, svg) без потерь | ||
gulp.task('images', function() { | ||
return gulp.src(['src/img/**/*']) | ||
.pipe(cache(imagemin({ | ||
progressive: true, | ||
interlaced: true | ||
}))) | ||
.pipe(gulp.dest('build/img')) | ||
.pipe(size({title: 'images'})); | ||
}); | ||
|
||
// Копирует и минифицирует все html страницы | ||
gulp.task('html', function() { | ||
return gulp.src(['src/*.html']) | ||
.pipe(minifyHTML()) | ||
.pipe(gulp.dest('build')) | ||
.pipe(size({title: 'html'})); | ||
}); | ||
|
||
// Копирует все файлы из корня, кроме html | ||
gulp.task('copy', function() { | ||
return gulp.src(['src/*', '!src/*.html']) | ||
.pipe(gulp.dest('build')) | ||
.pipe(size({title: 'copy'})); | ||
}); | ||
|
||
//Копирует главные файлы из bower_components/ в src/lib/ | ||
gulp.task('mainBowerFiles', function() { | ||
return gulp.src(mainBowerFiles()) | ||
.pipe(gulp.dest('src/lib')); | ||
}); | ||
|
||
// Проверка всех JS файлов в папке src/js | ||
gulp.task('jslint', function() { | ||
return gulp.src('src/js/**/*.js') | ||
.pipe(jshint()) | ||
.pipe(jshint.reporter('default', { verbose: true })); | ||
}); | ||
|
||
// Проверка стиля javascript | ||
gulp.task('jscs', function() { | ||
return gulp.src('src/js/**/*.js') | ||
.pipe(jscs()) | ||
.pipe(jscs.reporter()); | ||
}); | ||
|
||
// Проверка всех stylus файлов в папке src/css | ||
gulp.task('stylint', function() { | ||
return gulp.src('src/css/**/*.styl') | ||
.pipe(stylint()) | ||
.pipe(stylint.reporter()) | ||
.pipe(stylint.reporter('fail')); | ||
}); | ||
|
||
// Запускает локальный http сервер, следит за изменениями | ||
gulp.task('serve', ['build'], function() { | ||
browserSync.init({ | ||
notify: false, | ||
server: './', | ||
startPath: '/example/' | ||
}); | ||
|
||
gulp.watch(['example/*'], [browserSync.reload]); | ||
gulp.watch(['src/*.html'], ['html', browserSync.reload]); | ||
gulp.watch(['src/*', '!src/*.html'], ['copy', browserSync.reload]); | ||
gulp.watch(['src/js/**/*.js', 'src/lib/*.js'], ['scripts', browserSync.reload]); | ||
gulp.watch(['src/css/**/*.{css,styl}', 'src/lib/*.css'], ['styles', browserSync.reload]); | ||
gulp.watch(['src/fonts/**'], ['fonts', browserSync.reload]); | ||
gulp.watch(['src/img/**/*'], ['images', browserSync.reload]); | ||
}); | ||
|
||
//Публикация на сайте tour-360.ru по FTP | ||
gulp.task('deploy', function() { | ||
return gulp.src(['build/**/*', '!build/**/*.map']) | ||
.pipe(sftp({ | ||
host: 'tour-360.ru', | ||
auth: 'admin', | ||
remotePath: 'public_html/tour-player/v2.0' | ||
})); | ||
}); | ||
|
||
gulp.task('lint', ['jslint', 'jscs','stylint']); | ||
gulp.task('build', ['clean', 'clear', 'mainBowerFiles'], function() { | ||
gulp.run(['copy', 'html', 'images', 'fonts', 'scripts', 'styles']); | ||
}); | ||
gulp.task('default', ['build']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "tour-player", | ||
"version": "0.6.0", | ||
"description": "", | ||
"repository": {}, | ||
"scripts": { | ||
"postinstall": "bower i && gulp build && gulp serve" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Tour-360/tour-player" | ||
}, | ||
"keywords": [ | ||
"tour", | ||
"virtual", | ||
"player", | ||
"360", | ||
"HTML5", | ||
"raw" | ||
], | ||
"author": "Maxim Borodin <[email protected]> (http://maximborodin.ru)", | ||
"contributors": [ | ||
{ | ||
"name" : "Maxim Borodin", | ||
"email" : "[email protected]", | ||
"url" : "http://maximborodin.ru" | ||
},{ | ||
"name" : "Denis Borodin", | ||
"email" : "[email protected]", | ||
"url" : "http://denisborodin.ru" | ||
} | ||
], | ||
"license": "MIT", | ||
"devDependencies": { | ||
"bower": "^1.5.3", | ||
"browser-sync": "^2.9.0", | ||
"del": "^2.0.2", | ||
"gulp": "^3.9.0", | ||
"gulp-autoprefixer": "^3.0.2", | ||
"gulp-cache": "^0.3.0", | ||
"gulp-concat": "^2.6.0", | ||
"gulp-imagemin": "^2.3.0", | ||
"gulp-jscs": "^3.0.1", | ||
"gulp-jshint": "^1.11.2", | ||
"gulp-minify-html": "^1.0.4", | ||
"gulp-sftp": "^0.1.5", | ||
"gulp-size": "^1.0.0", | ||
"gulp-sourcemaps": "^1.5.2", | ||
"gulp-stylint": "^3.0.0", | ||
"gulp-stylus": "^2.1.0", | ||
"gulp-uglify": "^1.4.1", | ||
"main-bower-files": "^2.9.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Слишком старый браузер</title> | ||
</head> | ||
<body> | ||
<h3>Для отображения виртуального тура необходимо обновить браузер.</h3> | ||
<a href="" id="download" target="_blank">Обновить</a> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body, html | ||
margin 0 | ||
padding 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import "variables/*.styl" | ||
@import "layout.styl" |
Empty file.
Binary file not shown.
Oops, something went wrong.