Skip to content

Commit 3632e5c

Browse files
committed
Initial commit.
0 parents  commit 3632e5c

File tree

11 files changed

+225
-0
lines changed

11 files changed

+225
-0
lines changed

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# change these settings to your own preference
11+
indent_style = space
12+
indent_size = 4
13+
14+
# we recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.md]
21+
trim_trailing_whitespace = false
22+
23+
[{package,bower}.json]
24+
indent_style = space
25+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
dist
3+
.tmp
4+
.sass-cache
5+
6+
*.TODO
7+
*.sublime-workspace

.jshintrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"browser": true,
3+
"esnext": true,
4+
"bitwise": true,
5+
"camelcase": true,
6+
"curly": true,
7+
"eqeqeq": true,
8+
"immed": true,
9+
"indent": 4,
10+
"latedef": true,
11+
"newcap": true,
12+
"noarg": true,
13+
"quotmark": "single",
14+
"undef": true,
15+
"unused": true,
16+
"strict": true,
17+
"jquery": false
18+
}

app/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
7+
<!-- build:css styles/main.css -->
8+
<link rel="stylesheet" href="styles/main.css">
9+
<!-- endbuild -->
10+
</head>
11+
<body>
12+
<!-- build:js scripts/main.js -->
13+
<script src="scripts/main.js"></script>
14+
<!-- endbuild -->
15+
</body>
16+
</html>

app/robots.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User-agent: *
2+
Disallow:

app/scripts/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* jshint devel:true */
2+

app/styles/main.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
body {
2+
background: #000;
3+
font-family: Helvetica, Arial, sans-serif;
4+
color: #fff;
5+
}

gulpfile.js

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/* jshint node:true */
2+
'use strict';
3+
4+
var gulp = require('gulp');
5+
var $ = require('gulp-load-plugins')();
6+
7+
gulp.task('styles', function () {
8+
return gulp.src('app/styles/main.scss')
9+
.pipe($.plumber())
10+
.pipe($.sass({
11+
style: 'expanded',
12+
precision: 10
13+
}))
14+
.pipe($.autoprefixer({browsers: ['last 1 version']}))
15+
.pipe(gulp.dest('.tmp/styles'));
16+
});
17+
18+
gulp.task('jshint', function () {
19+
return gulp.src('app/scripts/**/*.js')
20+
.pipe($.jshint())
21+
.pipe($.jshint.reporter('jshint-stylish'))
22+
.pipe($.jshint.reporter('fail'));
23+
});
24+
25+
gulp.task('html', ['styles'], function () {
26+
var assets = $.useref.assets({searchPath: '{.tmp,app}'});
27+
28+
return gulp.src('app/*.html')
29+
.pipe(assets)
30+
.pipe($.if('*.js', $.uglify()))
31+
.pipe($.if('*.css', $.csso()))
32+
.pipe(assets.restore())
33+
.pipe($.useref())
34+
.pipe($.if('*.html', $.minifyHtml({conditionals: true, loose: true})))
35+
.pipe(gulp.dest('dist'));
36+
});
37+
38+
gulp.task('images', function () {
39+
return gulp.src('app/images/**/*')
40+
.pipe($.cache($.imagemin({
41+
progressive: true,
42+
interlaced: true
43+
})))
44+
.pipe(gulp.dest('dist/images'));
45+
});
46+
47+
gulp.task('fonts', function () {
48+
return gulp.src('app/fonts/**/*')
49+
.pipe($.filter('**/*.{eot,svg,ttf,woff}'))
50+
.pipe($.flatten())
51+
.pipe(gulp.dest('dist/fonts'));
52+
});
53+
54+
gulp.task('extras', function () {
55+
return gulp.src([
56+
'app/*.*',
57+
'!app/*.html',
58+
'node_modules/apache-server-configs/dist/.htaccess'
59+
], {
60+
dot: true
61+
}).pipe(gulp.dest('dist'));
62+
});
63+
64+
gulp.task('clean', require('del').bind(null, ['.tmp', 'dist']));
65+
66+
gulp.task('connect', ['styles'], function () {
67+
var serveStatic = require('serve-static');
68+
var serveIndex = require('serve-index');
69+
var app = require('connect')()
70+
.use(require('connect-livereload')({port: 35729}))
71+
.use(serveStatic('.tmp'))
72+
.use(serveStatic('app'))
73+
.use(serveIndex('app'));
74+
75+
require('http').createServer(app)
76+
.listen(9000)
77+
.on('listening', function () {
78+
console.log('Started connect web server on http://localhost:9000');
79+
});
80+
});
81+
82+
gulp.task('serve', ['connect', 'watch'], function () {
83+
require('opn')('http://localhost:9000');
84+
});
85+
86+
gulp.task('watch', ['connect'], function () {
87+
$.livereload.listen();
88+
89+
// watch for changes
90+
gulp.watch([
91+
'app/*.html',
92+
'.tmp/styles/**/*.css',
93+
'app/scripts/**/*.js',
94+
'app/images/**/*'
95+
]).on('change', $.livereload.changed);
96+
97+
gulp.watch('app/styles/**/*.scss', ['styles']);
98+
});
99+
100+
gulp.task('build', ['jshint', 'html', 'images', 'fonts', 'extras'], function () {
101+
return gulp.src('dist/**/*').pipe($.size({title: 'build', gzip: true}));
102+
});
103+
104+
gulp.task('default', ['clean'], function () {
105+
gulp.start('build');
106+
});

load-seed.sublime-project

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"folders":
3+
[
4+
{
5+
"follow_symlinks": true,
6+
"path": "."
7+
}
8+
]
9+
}

package.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"private": true,
3+
"engines": {
4+
"node": ">=0.10.0"
5+
},
6+
"devDependencies": {
7+
"apache-server-configs": "^2.7.1",
8+
"connect": "^3.0.1",
9+
"connect-livereload": "^0.5.0",
10+
"del": "^0.1.0",
11+
"gulp": "^3.6.0",
12+
"gulp-autoprefixer": "^1.0.1",
13+
"gulp-cache": "^0.2.2",
14+
"gulp-csso": "^0.2.6",
15+
"gulp-filter": "^1.0.2",
16+
"gulp-flatten": "^0.0.4",
17+
"gulp-if": "^1.2.1",
18+
"gulp-imagemin": "^1.2.1",
19+
"gulp-jshint": "^1.5.3",
20+
"gulp-livereload": "^2.0.0",
21+
"gulp-load-plugins": "^0.7.1",
22+
"gulp-minify-html": "^0.1.6",
23+
"gulp-plumber": "^0.6.3",
24+
"gulp-sass": "^0.7.1",
25+
"gulp-size": "^1.1.0",
26+
"gulp-uglify": "^1.0.1",
27+
"gulp-useref": "^1.0.2",
28+
"jshint-stylish": "^1.0.0",
29+
"main-bower-files": "^2.1.0",
30+
"opn": "^1.0.0",
31+
"serve-index": "^1.1.4",
32+
"serve-static": "^1.4.0"
33+
}
34+
}

0 commit comments

Comments
 (0)