Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jshint #83

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"browser": true,

"bitwise": true,
"curly": true,
"eqeqeq": true,
"forin": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": true,
"plusplus": true,
"quotmark": "double",
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"maxparams": 6,
"maxlen": 80,

"predef": ["jQuery"]
}
2 changes: 2 additions & 0 deletions _nav.jade
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ nav.nav.main-nav(role="navigation", class="banner")
a(href="/blog") Blog
li.nav-item
a(href="/sponsors") Sponsors
li.nav-item
a(href="/code-of-conduct") Code of Conduct

20 changes: 10 additions & 10 deletions blog/_blog.jade
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
article.h-entry
a.u-url(href= "")
h2.p-name= properties.name
a.u-url(href= "#{slug}")
h2.p-name= title
p
| Published by
=' '

each author, index in properties.author
a.p-author.h-card(href= properties.author[index].properties.url)= properties.author[index].properties.name
each author, index in author
a.p-author.h-card(href= author[index].website)= author[index].name
=' '

=' '
time.dt-published= properties.published
time.dt-published= published


.e-content
!= yield

.p-category
= properties.category[0].category
= category[0].category
=' '
= properties.category[0].tags
= category[0].tags


h3 About the Author
each author, index in properties.author
each author, index in author
p
a.p-author.h-card(href= properties.author[index].properties.url)= properties.author[index].properties.name
p= properties.author[index].properties.description
a.p-author.h-card(href= author[index].website)= author[index].name
p= author[index].description
15 changes: 6 additions & 9 deletions blog/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ p Some stuff we want to say about our blog.
for post, slug in public.blog.posts._data
if post.layout !== false
article.h-entry
a.u-url(href= "#{ post.properties.permalink[0].url }")
h2.p-name= post.properties.name
a.u-url(href= "#{slug}")
h2.p-name= post.title
p
| Published by
=' '

each author, index in post.properties.author
a.p-author.h-card(href= post.properties.author[index].properties.url)= post.properties.author[index].properties.name
each author, index in post.author
a.p-author.h-card(href= post.author[index].website)= post.author[index].name
=' '

| on
=' '
time.dt-published= post.properties.published

p.p-summary= post.properties.summary


time.dt-published= post.published

p.p-summary= post.summary
198 changes: 52 additions & 146 deletions blog/posts/_data.json
Original file line number Diff line number Diff line change
@@ -1,157 +1,63 @@
{
"post-2": {
"type": [
"h-entry"
"title":"Sample Post 2",
"author": [
{
"name":"John Doe",
"website":"http://www.google.com",
"description":"lobortis viverra dolor tincidunt eu. Pellentesque nec ma"
},
{
"name":"Kevin Doe",
"url":"www.blackle.com",
"description":"lobortis viverra dolor tincidunt eu. Pellentesque nec ma"
}
],
"properties": {
"name": [
"Sample Post 2"
],
"author": [
{
"value": "John Doe",
"type": [
"h-card"
],
"properties": {
"name": [
"John Doe"
],
"url": [
"http://example.com"
],
"description": [
"lobortis viverra dolor tincidunt eu. Pellentesque nec ma"
]
}
},
{
"value": "Kevin Doe",
"type": [
"h-card"
],
"properties": {
"name": [
"Kevin Doe"
],
"url": [
"http://example2.com"
],
"description": [
"lobortis viverra dolor tincidunt eu. Pellentesque nec ma"
]
}
}
],
"published": [
"2015-01-04 12:00:00"
],
"summary": [
"Sed elementum consectetur sem, lobortis viverra dolor tincidunt eu. Pellentesque nec malesuada tortor, nec rutrum est. Donec fermentum ut nunc at scelerisque. Morbi elementum, lacus at bibendum vehicula, neque felis semper urna, at auctor mi lorem nec ex."
],
"category": [
{
"category": "cat1",
"tags": "tag1, tag2, tag3"
}
],
"permalink": [
{
"url" : "/blog/posts/post-2"
}
]
}
"published":"2015-01-04 12:00:00",
"summary":"Sed elementum consectetur sem, lobortis viverra dolor tincidunt eu. Pellentesque nec malesuada tortor, nec rutrum est. Donec fermentum ut nunc at scelerisque. Morbi elementum, lacus at bibendum vehicula, neque felis semper urna, at auctor mi lorem nec ex.",
"category": [
{
"category": "cat1",
"tags": "tag1, tag2, tag3"
}
]
},

"styleguide": {
"type": [
"h-entry"
"title":"The Styleguide",
"author": [
{
"name":"Jane Doe",
"website":"http://www.yahoo.com",
"description":"lobortis viverra dolor tincidunt eu. Pellentesque nec ma"
}
],
"properties": {
"name": [
"Sample Post 1"
],
"author": [
{
"value": "Jane Doe",
"type": [
"h-card"
],
"properties": {
"name": [
"Jane Doe"
],
"url": [
"http://example.com"
],
"description": [
"lobortis viverra dolor tincidunt eu. Pellentesque nec ma"
]
}
}
],
"published": [
"2015-01-03 12:00:00"
],
"summary": [
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas id tortor feugiat, mollis urna non, viverra lectus. Sed fringilla rutrum orci eu volutpat. Donec viverra enim vitae purus bibendum, quis euismod ligula ultricies."
],
"category": [
{
"category": "cat1",
"tags": "tag2"
}
],
"permalink": [
{
"url" : "/blog/posts/post-1"
}
]
}
"published":"2015-01-03 12:00:00",
"summary":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas id tortor feugiat, mollis urna non, viverra lectus. Sed fringilla rutrum orci eu volutpat. Donec viverra enim vitae purus bibendum, quis euismod ligula ultricies.",
"category": [
{
"category": "cat1",
"tags": "tag2"
}
]
},

"welcome": {
"type": [
"h-entry"
"title":"Welcome to GothamSass!",
"author": [
{
"name":"Team GothamSass",
"website":"http://www.gothamsass.org",
"description":"We are Gothamsass!"
}
],
"properties": {
"name": [
"Welcome to GothamSass!"
],
"author": [
{
"value": "Team GothamSass",
"type": [
"h-card"
],
"properties": {
"name": [
"Team GothamSass"
],
"url": [
"http://example.com"
],
"description": [
"lobortis viverra dolor tincidunt eu. Pellentesque nec ma"
]
}
}
],
"published": [
"2015-01-01 12:00:00"
],
"summary": [
"GothamSass for the New Year!"
],
"category": [
{
"category": "category",
"tags": "tag1, tag2, tag3"
}
],
"permalink": [
{
"url" : "/blog/posts/welcome"
}
]
}
"published":"2015-01-01 12:00:00",
"summary": "GothamSass for the New Year!",
"category": [
{
"category": "category",
"tags": "tag1, tag2, tag3"
}
]
}
}
12 changes: 11 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ var reload = browserSync.reload;
var harp = require('harp');
var scsslint = require('gulp-scss-lint');
var cache = require('gulp-cached');
var jshint = require('gulp-jshint');

var paths = {
templates: '**/*.{jade, md}',
json: '**/_data.json',
css: 'assets/stylesheets/*.css',
sass: ['assets/stylesheets/**/*.scss', 'assets/stylesheets/*.scss'],
images: 'assets/stylesheets/img/**/*',
Expand Down Expand Up @@ -50,13 +52,21 @@ gulp.task('serve', function () {
/**
* Lint files
*/
gulp.task('lint', function() {
gulp.task('lint-sass', function() {
gulp.src(paths.sass)
.pipe(cache('scsslint'))
.pipe(scsslint({'config': 'lint.yml',}))
.pipe(reload({stream: true}));
});

gulp.task('lint-js', function() {
return gulp.src([
paths.json
])
.pipe(jshint())
.pipe(jshint.reporter('default'));
});


/**
* Default task, running just `gulp` will compile the sass,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"browser-sync": "^1.9.0",
"gulp": "^3.8.10",
"gulp-cached": "^1.0.2",
"gulp-jshint": "^1.9.2",
"gulp-scss-lint": "^0.1.4",
"scsslint": "0.0.3"
}
Expand Down