aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorCamil Staps2015-02-19 18:55:43 +0100
committerCamil Staps2015-02-19 18:55:43 +0100
commit781c2b265e1389f69f280d9a8c039a59678a78ec (patch)
tree24c0d4abc80685237ee91341ccb4a13807150c1c /web
parentdirectory structure (diff)
directory structure
Diffstat (limited to 'web')
-rw-r--r--web/trunk/.gitignore3
-rw-r--r--web/trunk/bower.json20
-rw-r--r--web/trunk/gulpfile.js100
-rw-r--r--web/trunk/package.json41
4 files changed, 0 insertions, 164 deletions
diff --git a/web/trunk/.gitignore b/web/trunk/.gitignore
deleted file mode 100644
index 36a8a47..0000000
--- a/web/trunk/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bower_components/*
-node_modules/*
-assets/*
diff --git a/web/trunk/bower.json b/web/trunk/bower.json
deleted file mode 100644
index db63d0a..0000000
--- a/web/trunk/bower.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "Botleagues Client",
- "version": "0.0.0",
- "homepage": "https://github.com/camilstaps/Botleagues",
- "authors": [
- "Camil Staps <info@camilstaps.nl>"
- ],
- "license": "GPL v3.0",
- "private": true,
- "ignore": [
- "**/.*",
- "node_modules",
- "bower_components",
- "test",
- "tests"
- ],
- "dependencies": {
- "bootstrap": "~3.3.2"
- }
-}
diff --git a/web/trunk/gulpfile.js b/web/trunk/gulpfile.js
deleted file mode 100644
index 2030db9..0000000
--- a/web/trunk/gulpfile.js
+++ /dev/null
@@ -1,100 +0,0 @@
-// see https://github.com/tugberkugurlu/gulp-bootswatch-sample/
-
-var gulp = require('gulp'),
- minifycss = require('gulp-minify-css'),
- concat = require('gulp-concat'),
- less = require('gulp-less'),
- gulpif = require('gulp-if'),
- order = require('gulp-order'),
- gutil = require('gulp-util'),
- rename = require('gulp-rename'),
- foreach = require('gulp-foreach'),
- debug = require('gulp-debug'),
- path =require('path'),
- merge = require('merge-stream'),
- del = require('del');
-
-var bootswatch_theme = 'superhero';
-
-gulp.task('default', ['clean'], function() {
- gulp.start('fonts', 'styles');
-});
-
-gulp.task('clean', function(cb) {
- del(['assets/css', 'assets/js', 'assets/less', 'assets/img', 'assets/fonts'], cb)
-});
-
-gulp.task('fonts', function() {
-
- var fileList = [
- 'bower_components/bootstrap/dist/fonts/*',
- 'bower_components/fontawesome/fonts/*'
- ];
-
- return gulp.src(fileList)
- .pipe(gulp.dest('assets/fonts'));
-});
-
-gulp.task('styles', function() {
-
- var baseContent = '@import "bower_components/bootstrap/less/bootstrap.less";@import "bower_components/bootswatch/' + bootswatch_theme + '/variables.less";@import "bower_components/bootswatch/' + bootswatch_theme + '/bootswatch.less";@import "bower_components/bootstrap/less/utilities.less";';
- var isBootswatchFile = function(file) {
- var suffix = 'bootswatch.less';
- return file.path.indexOf(suffix, file.path.length - suffix.length) !== -1;
- }
-
- var isBootstrapFile = function(file) {
- var suffix = 'bootstrap-',
- fileName = path.basename(file.path);
-
- return fileName.indexOf(suffix) == 0;
- }
-
- var fileList = [
- 'client/less/main.less',
- 'bower_components/bootswatch/**/bootswatch.less',
- 'bower_components/fontawesome/css/font-awesome.css'
- ];
-
- return gulp.src(fileList)
- .pipe(gulpif(isBootswatchFile, foreach(function(stream, file) {
- var themeName = path.basename(path.dirname(file.path)),
- content = replaceAll(baseContent, bootswatch_theme, themeName),
- file = string_src('bootstrap-' + themeName + '.less', content);
-
- return file;
- })))
- .pipe(less())
- .pipe(gulp.dest('assets/css'))
- .pipe(gulpif(isBootstrapFile, foreach(function(stream, file) {
- var fileName = path.basename(file.path),
- themeName = fileName.substring(fileName.indexOf('-') + 1, fileName.indexOf('.'));
-
- // http://stackoverflow.com/questions/21719833/gulp-how-to-add-src-files-in-the-middle-of-a-pipe
- // https://github.com/gulpjs/gulp/blob/master/docs/recipes/using-multiple-sources-in-one-task.md
- return merge(stream, gulp.src(['assets/css/font-awesome.css', 'assets/css/main.css']))
- .pipe(concat('style-' + themeName + ".css"))
- .pipe(gulp.dest('assets/css'))
- .pipe(rename({suffix: '.min'}))
- .pipe(minifycss())
- .pipe(gulp.dest('assets/css'));
- })))
-});
-
-// http://stackoverflow.com/questions/1144783/replacing-all-occurrences-of-a-string-in-javascript
-function escapeRegExp(string) {
- return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
-}
-
-function replaceAll(string, find, replace) {
- return string.replace(new RegExp(escapeRegExp(find), 'g'), replace);
-}
-
-function string_src(filename, string) {
- var src = require('stream').Readable({ objectMode: true })
- src._read = function () {
- this.push(new gutil.File({ cwd: "", base: "", path: filename, contents: new Buffer(string) }))
- this.push(null)
- }
- return src
-} \ No newline at end of file
diff --git a/web/trunk/package.json b/web/trunk/package.json
deleted file mode 100644
index f6d5fa9..0000000
--- a/web/trunk/package.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "Botleagues",
- "version": "0.0.0",
- "description": "",
- "main": ".",
- "dependencies": {
- "gulp": "^3.8.11",
- "gulp-autoprefixer": "^2.1.0",
- "gulp-changed": "^1.1.1",
- "gulp-concat": "^2.5.0",
- "gulp-jshint": "^1.9.2",
- "gulp-minify-css": "^0.4.5",
- "gulp-minify-html": "^0.1.8",
- "gulp-strip-debug": "^1.0.2",
- "gulp-uglify": "^1.1.0"
- },
- "devDependencies": {
- "del": "^1.1.1",
- "gulp-debug": "^2.0.0",
- "gulp-foreach": "^0.1.0",
- "gulp-if": "^1.2.5",
- "gulp-less": "^3.0.0",
- "gulp-order": "^1.1.1",
- "gulp-rename": "^1.2.0",
- "gulp-util": "^3.0.3",
- "merge-stream": "^0.1.7"
- },
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/camilstaps/Botleagues"
- },
- "author": "Camil Staps <info@camilstaps.nl>",
- "license": "GPL v3.0",
- "bugs": {
- "url": "https://github.com/camilstaps/Botleagues/issues"
- },
- "homepage": "https://github.com/camilstaps/Botleagues"
-}