Skip to content

Commit

Permalink
Обновления
Browse files Browse the repository at this point in the history
  • Loading branch information
steelcat committed Mar 14, 2015
1 parent 24aa7d2 commit f0c42b6
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.idea/
node_modules/
bower_components/
dev/
2 changes: 1 addition & 1 deletion app/index.jade
Original file line number Diff line number Diff line change
@@ -1 +1 @@
extends ../jade/_layout.jade
extends jade/_layout.jade
8 changes: 8 additions & 0 deletions app/jade/_layout.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
doctype html
html
head
link(rel="stylesheet" href="css/main.css")
body
.container
.left LEFT
.right RIGHT
2 changes: 2 additions & 0 deletions app/scss/_vendor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import '../../bower_components/bourbon/app/assets/stylesheets/_bourbon.scss';
@import '../../bower_components/neat/app/assets/stylesheets/_neat.scss';
14 changes: 14 additions & 0 deletions app/scss/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$visual-grid: true;
@import 'vendor';
.container {
@include outer-container;
}
.left {
@include span-columns(4);
background: #333;
}

.right {
@include span-columns(4);
background-color: #666;
}
7 changes: 6 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@
"test",
"tests"
],
"dependencies": {}
"dependencies": {
"bourbon": "~4.2.1",
"neat": "~1.7.1",
"jquery": "~1.11.2"
},
"devDependencies": {}
}
41 changes: 41 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Подключение плагинов Gulp
var gulp = require('gulp'),
connect = require('gulp-connect'),
jade = require('gulp-jade'),
sass = require('gulp-sass');

// Задача по-умолчанию
gulp.task('default', ['server','jade','sass','watch']);

// Запускаем сервер
gulp.task('server', ['watch'], function() {
connect.server({
port: 9000, // порт сервера
root: 'dev', // корневая папка запуска сервера
livereload: true // автоматический перезапуск сервера
})
});

// Компилируем Jade-шаблоны и копируем в папку dev
gulp.task('jade', function() {
gulp.src('./app/**/[^_]*.jade')
.pipe(jade({
pretty: true
}))
.pipe(gulp.dest('./dev/'))
.pipe(connect.reload());
});

// Компилируем SCSS-шаблоны и копируем в папку public
gulp.task('sass', function() {
return gulp.src(['./app/scss/main.scss'])
.pipe(sass())
.on('error', function(err){ console.log(err.message); })
.pipe(gulp.dest('./dev/css/'));
});

// Наблюдаем за изменением файлов и компилируем измененные файлы
gulp.task('watch', function() {
gulp.watch('./app/**/*.jade', ['jade']);
gulp.watch('./app/**/*.scss', ['sass']);
});
Empty file removed jade/_layout.jade
Empty file.
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "loft-app",
"version": "1.0.0",
"description": "Простой шаблон для создания фронтенд-проекта с использованием методологии БЭМ и технологий SCSS, Jade и Gulp.",
"main": "index.js",
"dependencies": {},
"devDependencies": {
"gulp": "^3.8.11",
"gulp-connect": "^2.2.0",
"gulp-jade": "^1.0.0",
"gulp-rigger": "^0.5.8",
"gulp-sass": "^1.3.3",
"gulp-watch": "^4.1.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://[email protected]/steelcat/loft-app.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/steelcat/loft-app/issues"
},
"homepage": "https://github.com/steelcat/loft-app"
}

0 comments on commit f0c42b6

Please sign in to comment.