Skip to content

Commit 77afb14

Browse files
committed
first commit
0 parents  commit 77afb14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+9668
-0
lines changed

.bowerrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "../bower_components/"
3+
}

.csscomb.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"sort-order-fallback": "abc",
3+
"remove-empty-rulesets": true,
4+
"always-semicolon": true,
5+
"color-case": "lower",
6+
"block-indent": " ",
7+
"color-shorthand": true,
8+
"element-case": "lower",
9+
"eof-newline": true,
10+
"leading-zero": false,
11+
"quotes": "single",
12+
"space-before-colon": "",
13+
"space-after-colon": " ",
14+
"space-before-combinator": " ",
15+
"space-after-combinator": " ",
16+
"space-between-declarations": "\n",
17+
"space-before-opening-brace": " ",
18+
"space-after-opening-brace": "\n",
19+
"space-after-selector-delimiter": " ",
20+
"space-before-selector-delimiter": "",
21+
"space-before-closing-brace": "\n",
22+
"strip-spaces": true,
23+
"tab-size": true,
24+
"vendor-prefix-align": true
25+
}

.eslintrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"env": {
3+
"browser": true
4+
},
5+
"extends": "eslint:recommended",
6+
"rules": {
7+
"indent": [2, 2],
8+
"quotes": [2, "single"],
9+
"semi": [2, "always"]
10+
}
11+
}

.gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Numerous always-ignore extensions
2+
*.bak
3+
*.diff
4+
*.err
5+
*.exe
6+
*.log
7+
*.orig
8+
*.rej
9+
*.sass-cache
10+
*.swo
11+
*.swp
12+
*.vi
13+
*~
14+
15+
# OS or Editor folders
16+
*.sublime-grunt.cache
17+
*.sublime-project
18+
*.sublime-workspace
19+
._*
20+
.cache
21+
.DS_Store
22+
.project
23+
.settings
24+
.tmproj
25+
Thumbs.db
26+
27+
# Folders to ignore
28+
.CVS
29+
.git
30+
.hg
31+
.idea
32+
.svn
33+
bower_components
34+
dist
35+
build
36+
37+
# Node.JS
38+
node_modules
39+
npm-debug.log

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Loftshool builder
2+
3+
Getting started:
4+
5+
1. clone this repo
6+
2. cd path/to/builder
7+
3. npm install gulpjs/gulp#4.0 -g
8+
4. npm install
9+
5. run "gulp" command to start

bower.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "loftschool-builder",
3+
"version": "1.0.0",
4+
"ignore": [
5+
"**/.*",
6+
"node_modules",
7+
"bower_components"
8+
],
9+
"dependencies": {
10+
"jquery": "2.1.3",
11+
"animate.css": "^3.5.2",
12+
"waypoints": "^4.0.1",
13+
"Snap.svg": "snap.svg#^0.5.1",
14+
"jquery-mask-plugin": "https://github.com/igorescobar/jQuery-Mask-Plugin.git#^1.14.11",
15+
"jquery.counterup": "^2.1.0",
16+
"hover": "^2.1.1",
17+
"rangeslider.js": "^2.3.1",
18+
"ekko-lightbox": "^5.2.0",
19+
"normalize.css": "^4.1.1",
20+
"swiper": "^3.4.2"
21+
}
22+
}

gulp/config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
app: {
3+
name:'App name',
4+
color:'#ffffff'
5+
},
6+
root: './build',
7+
autoprefixerConfig: ['last 3 version', '> 1%', 'ie 8', 'ie 9', 'Opera 12.1'],
8+
ftp: {
9+
host: '',
10+
user: '',
11+
pass: ''
12+
},
13+
favicon_data_file: './source/favicon/faviconData.json'
14+
};

gulp/paths/app.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = [
4+
'./source/js/*.js'
5+
];

gulp/paths/css.stock.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict';
2+
3+
module.exports = [
4+
'../bower_components/bootstrap/dist/css/bootstrap.min.css', //каркас бутстрапа
5+
// './node_modules/swiper/dist/css/swiper.min.css', //Галерея
6+
// './bower_components/ekko-lightbox/dist/ekko-lightbox.min.css', // лайтбокс для бутстрапа
7+
// './bower_components/animate.css/animate.min.css', //библиотека анимаций
8+
// './bower_components/ion.rangeSlider/css/ion.rangeSlider.css', //красивый ползунок
9+
// './bower_components/ion.rangeSlider/css/ion.rangeSlider.skinHTML5.css', //тема ползунка
10+
// '', //Заготовка
11+
];

gulp/paths/js.stock.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
3+
module.exports = [
4+
'../bower_components/bootstrap/dist/js/bootstrap.min.js',
5+
'../bower_components/jquery/dist/jquery.min.js',
6+
// './bower_components/swiper/dist/js/swiper.jquery.min.js',
7+
// './bower_components/ekko-lightbox/dist/ekko-lightbox.min.js',
8+
// './bower_components/ion.rangeSlider/js/ion.rangeSlider.min.js',
9+
// './bower_components/jquery.redirect/jquery.redirect.js',
10+
// './bower_components/jquery.counterup/jquery.counterup.min.js',
11+
// './bower_components/jquery-mask-plugin/dist/jquery.mask.min.js',
12+
// './bower_components/Snap.svg/dist/snap.svg-min.js',
13+
// './bower_components/waypoints/lib/jquery.waypoints.min.js'
14+
];

gulp/paths/tasks.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use strict';
2+
3+
module.exports = [
4+
'./gulp/tasks/sass.js',
5+
'./gulp/tasks/serve.js',
6+
'./gulp/tasks/jade.js',
7+
'./gulp/tasks/watch.js',
8+
'./gulp/tasks/clean.js',
9+
'./gulp/tasks/js.stock.js',
10+
'./gulp/tasks/css.stock.js',
11+
'./gulp/tasks/js.process.js',
12+
'./gulp/tasks/js.lint.js',
13+
'./gulp/tasks/copy.image.js',
14+
'./gulp/tasks/copy.fonts.js',
15+
'./gulp/tasks/ftp.upload.js',
16+
'./gulp/tasks/favicon.generate.js',
17+
'./gulp/tasks/favicon.inject.js',
18+
'./gulp/tasks/favicon',
19+
'./gulp/tasks/sprite.svg.js'
20+
];
21+

gulp/paths/template.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = [
4+
'./source/template/*.jade'
5+
];

gulp/tasks/clean.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
module.exports = function() {
4+
$.gulp.task('clean', function(cb) {
5+
return $.rimraf($.config.root, cb);
6+
});
7+
};

gulp/tasks/copy.fonts.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
module.exports = function() {
4+
$.gulp.task('copy.fonts', function() {
5+
return $.gulp.src('./source/fonts/**/*.*', { since: $.gulp.lastRun('copy.fonts') })
6+
.pipe($.gulp.dest($.config.root + '/assets/fonts'));
7+
});
8+
};

gulp/tasks/copy.image.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
3+
module.exports = function() {
4+
$.gulp.task('copy.image', function() {
5+
return $.gulp.src(['./source/images/*.*'], { since: $.gulp.lastRun('copy.image') })
6+
.pipe($.image({
7+
interlaced: true,
8+
progressive: true,
9+
optimizationLevel: 5,
10+
svgoPlugins: [{removeViewBox: true}]
11+
}))
12+
.pipe($.gulp.dest($.config.root + '/assets/img'));
13+
});
14+
};

gulp/tasks/css.stock.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
module.exports = function() {
4+
$.gulp.task('css.stock', function() {
5+
return $.gulp.src($.path.cssStock)
6+
.pipe($.gp.csso())
7+
.pipe($.gulp.dest($.config.root + '/assets/css'))
8+
})
9+
};

gulp/tasks/favicon.generate.js

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
'use strict';
2+
// File where the favicon markups are stored
3+
// Generate the icons. This task takes a few seconds to complete.
4+
// You should run it at least once to create the icons. Then,
5+
// you should run it whenever RealFaviconGenerator updates its
6+
// package (see the check-for-favicon-update task below).
7+
8+
module.exports = function() {
9+
$.gulp.task('favicon-generate', function (done) {
10+
$.gp.realFavicon.generateFavicon({
11+
masterPicture: './source/favicon/icon.png',
12+
dest: $.config.root + '/favicon',
13+
iconsPath: 'favicon',
14+
design: {
15+
ios: {
16+
pictureAspect: 'backgroundAndMargin',
17+
backgroundColor: $.config.app.color,
18+
margin: '14%',
19+
assets: {
20+
ios6AndPriorIcons: true,
21+
ios7AndLaterIcons: true,
22+
precomposedIcons: true,
23+
declareOnlyDefaultIcon: true
24+
},
25+
appName: $.config.app.name
26+
},
27+
desktopBrowser: {},
28+
windows: {
29+
pictureAspect: 'noChange',
30+
backgroundColor: $.config.app.color,
31+
onConflict: 'override',
32+
assets: {
33+
windows80Ie10Tile: true,
34+
windows10Ie11EdgeTiles: {
35+
small: true,
36+
medium: true,
37+
big: true,
38+
rectangle: true
39+
}
40+
},
41+
appName: $.config.app.name
42+
},
43+
androidChrome: {
44+
pictureAspect: 'backgroundAndMargin',
45+
margin: '17%',
46+
backgroundColor: $.config.app.color,
47+
themeColor: $.config.app.color,
48+
manifest: {
49+
name: $.config.app.name,
50+
display: 'standalone',
51+
orientation: 'notSet',
52+
onConflict: 'override',
53+
declared: true
54+
},
55+
assets: {
56+
legacyIcon: true,
57+
lowResolutionIcons: true
58+
}
59+
},
60+
safariPinnedTab: {
61+
pictureAspect: 'blackAndWhite',
62+
threshold: 75,
63+
themeColor: $.config.app.color
64+
}
65+
},
66+
settings: {
67+
scalingAlgorithm: 'Mitchell',
68+
errorOnImageTooSmall: false
69+
},
70+
markupFile: $.config.favicon_data_file
71+
}, function () {
72+
done();
73+
});
74+
});
75+
};

gulp/tasks/favicon.inject.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict';
2+
// var fs = require('fs');
3+
4+
// Inject the favicon markups in your HTML pages. You should run
5+
// this task whenever you modify a page. You can keep this task
6+
// as is or refactor your existing HTML pipeline.
7+
module.exports = function() {
8+
$.gulp.task('favicon-inject', function () {
9+
return $.gulp.src($.config.root + '/**.html')
10+
.pipe($.gp.realFavicon.injectFaviconMarkups(JSON.parse($.fs.readFileSync($.config.favicon_data_file)).favicon.html_code))
11+
.pipe($.gulp.dest($.config.root));
12+
});
13+
};
14+
/*
15+
// Check for updates on RealFaviconGenerator (think: Apple has just
16+
// released a new Touch icon along with the latest version of iOS).
17+
// Run this task from time to time. Ideally, make it part of your
18+
// continuous integration system.
19+
module.exports = function() {
20+
$.gulp.task('check-for-favicon-update', function (done) {
21+
var currentVersion = JSON.parse(fs.readFileSync(FAVICON_DATA_FILE)).version;
22+
$.gp.realFavicon.checkForUpdates(currentVersion, function (err) {
23+
if (err) {
24+
throw err;
25+
}
26+
});
27+
});
28+
};
29+
*/

gulp/tasks/favicon.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
// File where the favicon markups are stored
3+
// Generate the icons. This task takes a few seconds to complete.
4+
// You should run it at least once to create the icons. Then,
5+
// you should run it whenever RealFaviconGenerator updates its
6+
// package (see the check-for-favicon-update task below).
7+
8+
module.exports = function() {
9+
$.gulp.task('favicon', $.gulp.series(
10+
$.gulp.parallel(
11+
'favicon-generate',
12+
'jade'
13+
),
14+
'favicon-inject'
15+
));
16+
};

gulp/tasks/ftp.upload.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
'use strict';
2+
3+
module.exports = function() {
4+
$.gulp.task('up', function () {
5+
return $.gulp.src($.config.root + '/**', {since: $.gulp.lastRun('up')})
6+
.pipe($.ftp({
7+
host: $.config.ftp.host,
8+
user: $.config.ftp.user,
9+
pass: $.config.ftp.pass
10+
}));
11+
});
12+
$.gulp.task('up.css', function () {
13+
return $.gulp.src($.config.root + '/assets/css/**')
14+
.pipe($.ftp({
15+
host: $.config.ftp.host,
16+
user: $.config.ftp.user,
17+
pass: $.config.ftp.pass
18+
}));
19+
});
20+
$.gulp.task('up.js', function () {
21+
return $.gulp.src($.config.root + '/assets/js/**')
22+
.pipe($.ftp({
23+
host: $.config.ftp.host,
24+
user: $.config.ftp.user,
25+
pass: $.config.ftp.pass
26+
}));
27+
});
28+
};

0 commit comments

Comments
 (0)