From 9c53d32e84b3403c66d22cfd7b616a1bc6340157 Mon Sep 17 00:00:00 2001 From: Vladimir Lugovsky Date: Fri, 10 Jun 2016 21:21:04 +0300 Subject: [PATCH] feat(docs): add development build to documentation --- docs/config.json | 4 +- docs/contents/articles/091-downloads/index.md | 37 ++++++++++++ gulp/conf.js | 1 + gulp/devRelease.js | 57 +++++++++++++++++++ gulp/marketplace.js | 4 +- 5 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 docs/contents/articles/091-downloads/index.md create mode 100644 gulp/devRelease.js diff --git a/docs/config.json b/docs/config.json index b8d15c3d9..8e9e1b679 100644 --- a/docs/config.json +++ b/docs/config.json @@ -25,7 +25,9 @@ "perPage": 3, "groupSort": { "Quick Start": 1000, - "Customization": 900 + "Customization": 900, + "Components": 800, + "Other": 100 } } } diff --git a/docs/contents/articles/091-downloads/index.md b/docs/contents/articles/091-downloads/index.md new file mode 100644 index 000000000..cebe57734 --- /dev/null +++ b/docs/contents/articles/091-downloads/index.md @@ -0,0 +1,37 @@ +--- +title: Downloads +author: vl +sort: 900 +group: Other +template: article.jade +--- + +If you have problems installing node.js and/or other tools to build and run BlurAdmin on your machine and you just want to download html/js/css files, you can find links for download on this page. + +Development (non-compressed) files can be found in `{ARCHIVE_ROOT}/blur-admin-{VERSION}/dev-release` directory. Compressed files are in `{ARCHIVE_ROOT}/blur-admin-{VERSION}/release` directory. +Then you can just open `index.html` to view your local version. + +**Please note**: *As chrome doesn't support AJAX requests, when you open HTML file via **file** protocol, you might need to disable web security to have your template running.* + +Sample command on OS X: + +```bash +open -a Google\ Chrome --args --disable-web-security --user-data-dir=~/ChromeDevSession/ +``` + +Sample command on Linux: + +```bash +google-chrome --user-data-dir="~/chrome-dev-session" --disable-web-security +``` + +Sample command on Windows: + +```bash +start chrome --user-data-dir="C:/Chrome dev session" --disable-web-security +``` + +## Links for downloads + +[BlurAdmin 1.2.0](/blur-admin/downloads/blur-admin-1.2.0.zip) + diff --git a/gulp/conf.js b/gulp/conf.js index 1f0be2d69..a29fd293c 100644 --- a/gulp/conf.js +++ b/gulp/conf.js @@ -14,6 +14,7 @@ var gutil = require('gulp-util'); exports.paths = { src: 'src', dist: 'release', + devDist: 'dev-release', tmp: '.tmp', e2e: 'e2e' }; diff --git a/gulp/devRelease.js b/gulp/devRelease.js new file mode 100644 index 000000000..43278680d --- /dev/null +++ b/gulp/devRelease.js @@ -0,0 +1,57 @@ +'use strict'; + +var path = require('path'); +var gulp = require('gulp'); +var conf = require('./conf'); + +var $ = require('gulp-load-plugins')({ + pattern: ['gulp-*', 'main-bower-files'] +}); + +var _ = require('lodash'); + +gulp.task('dev-fonts', function () { + return gulp.src($.mainBowerFiles()) + .pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}')) + .pipe($.flatten()) + .pipe(gulp.dest(path.join(conf.paths.devDist, 'fonts'))); +}); + +gulp.task('dev-copy-lib', function () { + var assets = require('wiredep')(_.extend({}, conf.wiredep)); + var srcList = []; + srcList.push.apply(srcList, assets.js); + srcList.push.apply(srcList, assets.css); + return gulp + .src(srcList/*, { base: '.' }*/) +/* .pipe($.rename(function (p) { + p.dirname = p.dirname.replace(/\\/g, '/').replace('bower_components/', ''); + if (p.dirname.indexOf('/') !== -1) { + p.dirname = p.dirname.substr(0, p.dirname.indexOf('/')); + } + }))*/ + .pipe(gulp.dest(path.join(conf.paths.devDist, 'lib'))); +}); + +gulp.task('dev-css-replace', ['dev-copy-assets'], function() { + return gulp.src(path.join(conf.paths.devDist, '*.html')) + .pipe($.replace(//g, '')) + .pipe(gulp.dest(conf.paths.devDist)); +}); + +gulp.task('dev-js-replace', ['dev-copy-assets'], function() { + return gulp.src(path.join(conf.paths.devDist, '.html')) + .pipe($.replace(/