Skip to content
Snippets Groups Projects
Commit 37876e3b authored by pimka's avatar pimka
Browse files

Gulp deployment

parent 3a80ae1b
Branches
Tags
No related merge requests found
~dev_rating/application/cache/ ~dev_rating/application/cache/
~dev_rating/application/logs/*/ ~dev_rating/application/logs/*/
~dev_rating/application/config/ ~dev_rating/application/config/
~dev_rating/application/static/ ~dev_rating/static/*
!~dev_rating/static/img/
deploy/node_modules
nbproject/ nbproject/
*.*~ *.*~
/.project /.project
......
npm install --save-dev gulp
npm install --save-dev gulp-rename
npm install --save-dev gulp-concat-css
npm install --save-dev gulp-minify-css
npm install --save-dev gulp-less
npm install --save-dev gulp-autoprefixer
'use strict';
var gulp = require('gulp');
var prefix = require('gulp-autoprefixer'); //префиксы
var concatCss = require('gulp-concat-css'); //конкатенация
var minifyCss = require('gulp-minify-css'); //минификация
var rename = require('gulp-rename'); //переименовывание
var less = require('gulp-less');
var SRC_PATH = '../media/';
var DEST_PATH = '../~dev_rating/static/';
gulp.task('less', function () {
gulp.src(SRC_PATH + 'less/**/*.less')
.pipe(less())
.pipe(gulp.dest(DEST_PATH + 'css/'));
});
gulp.task('copyCss', function() {
gulp.src(SRC_PATH + 'css/**/*.css').pipe(gulp.dest(DEST_PATH + 'css/'));
});
gulp.task('copyJs', function() {
gulp.src(SRC_PATH + 'js/**/*.js').pipe(gulp.dest(DEST_PATH + 'js/'));
});
// gulp.task('css', ['less'], function() {
// return gulp.src('css/*.css')
// .pipe(concatCss('styles/bundle.css'))
// .pipe(prefix('last 2 versions', '> 1%', 'ie9'))
// .pipe(minifyCss(''))
// .pipe(rename({suffix: '.min'}))
// .pipe(gulp.dest('out/'));
// });
// gulp.task('copyHtml', function() {
// gulp.src('source/*.html').pipe(gulp.dest('public'));
// });
gulp.task('watch', function () {
gulp.watch(SRC_PATH + 'css/*.css', ['copyCss']);
gulp.watch(SRC_PATH + 'less/*.less', ['less']);
});
// gulp.task('watch', function () {
// gulp.watch(SRC_PATH + 'less/*.less', ['less']);
// });
gulp.task('default', ['less','copyCss', 'copyJs']);
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<head> <head>
<title>{% block pagename %}Вход в систему{% endblock %} | {{ System.Title }}</title> <title>{% block pagename %}Вход в систему{% endblock %} | {{ System.Title }}</title>
<link href='https://fonts.googleapis.com/css?family=PT+Sans&subset=cyrillic-ext,latin' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=PT+Sans&subset=cyrillic-ext,latin' rel='stylesheet' type='text/css'>
{{ HTML.script('static/js/libs/jquery-1.11.1.min.js')|raw }}
{{ HTML.style('static/css/common.css')|raw }} {{ HTML.style('static/css/common.css')|raw }}
{{ HTML.style('static/css/sign/sign.css')|raw }} {{ HTML.style('static/css/sign/sign.css')|raw }}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment