Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Stories/dt/linkcount #8 #12

Merged
merged 23 commits into from
May 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
51a3cae
Added stopwordChecker and rewritten helper functions to be more generic
terw-dan Apr 3, 2015
4e3f8cd
Moved helper functions to helper object and added first regex-array f…
terw-dan Apr 8, 2015
8b38530
Merge branch 'stories/DT/keywordDensity' into stories/DT/stopWords
terw-dan Apr 8, 2015
603b683
Merge branch 'stories/DT/stopWords' into stories/DT/fleschReading
terw-dan Apr 8, 2015
6081cc3
refactored init function and keyword density
terw-dan Apr 8, 2015
1b66659
fix return of stripspaces function
terw-dan Apr 8, 2015
340ca96
call string helper for regex in keyword density check.
terw-dan Apr 8, 2015
0ca579b
refactored headingtagschecker
terw-dan Apr 8, 2015
c1cd19e
first commit for syllable counter
terw-dan Apr 10, 2015
7c3df4a
updated regexes for syllable count
terw-dan Apr 10, 2015
1d642cd
updated regexstringbuilder to accept option to disable word boundaries
terw-dan Apr 13, 2015
7a5d20a
update for regular expressions for syllable count + added new jasmine…
terw-dan Apr 14, 2015
9ed757d
moved syllable config to config.js
terw-dan Apr 14, 2015
054b4c1
added flesch kincaid reading function and spec and refactored the syl…
terw-dan Apr 15, 2015
182c672
output flesh reading result + added 1 jasmine spec.
terw-dan Apr 15, 2015
e0bd0a0
added grunt tasks for js validation/building
terw-dan Apr 16, 2015
12ec150
fixed some missing semicolons in analyzer.js
terw-dan Apr 16, 2015
845a69c
fixed some styling and variable declarations
terw-dan Apr 17, 2015
697962a
gruntfile for minifying analyzer.js
terw-dan Apr 20, 2015
4b5217c
updated specs to validate JSlint. (missing semicolon's and ' in stead…
terw-dan Apr 20, 2015
8aedfd4
updated spec for link counter.
terw-dan Apr 21, 2015
efeae6f
added test for link counts, fixed external/internal count
terw-dan Apr 22, 2015
a32419b
changed naming of functions to increase the consistency across the di…
terw-dan Apr 22, 2015
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
18 changes: 18 additions & 0 deletions .gruntjshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"boss": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should use single quote's instead of double ones.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since in JavaScript there is no real difference between singles and doubles I decided to do everything with doubles, so if there is singlequote in a textstring it doesn't have to be escaped.

"curly": true,
"eqeqeq": true,
"eqnull": true,
"es3": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"sub": true,
"strict": true,
"undef": true,
"unused": true,

"node": true
}
3 changes: 3 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"preset": "jquery"
}
1 change: 1 addition & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gruntfile.js
26 changes: 26 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,


"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "double",
"sub": true,
"strict": false,

"undef": false,
"unused": true,
"funcscope": false,
"browser": true,
"jquery": false,

"globals": {
"exports": true,
"module": false
}
}
38 changes: 38 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*jslint es5: false */
module.exports = function(grunt) {
'use strict';

//require('time-grunt')(grunt);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this line, because it seems it's not needed anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the comment tags. We actually do want to time grunt, so this needs to be included.


// Define project configuration
var project = {
paths: {
get config() {
return this.grunt + 'config/';
},
grunt: 'grunt/',
js: 'js/'

},
files: {
js: [
'js/*.js',
'!js/*.min.js',
'spec/*.js',
'!spec/*.min.js'
],

get config() {
return project.paths.config + '*.js';
},
grunt: 'Gruntfile.js'
},
pkg: grunt.file.readJSON( 'package.json' )
};

// Load Grunt configurations and tasks
require( 'load-grunt-config' )(grunt, {
configPath: require( 'path' ).join( process.cwd(), project.paths.config ),
data: project
});
};
17 changes: 17 additions & 0 deletions grunt/config/aliases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Grunt aliases
---
# Build everything
build:
- 'build:js'
# Build JavaScript from assets to production
'build:js':
- 'uglify'
# Check health of the project
check:
- 'jshint'
- 'jsonlint'
- 'jsvalidate'
# Default task
default:
- check
- build
25 changes: 25 additions & 0 deletions grunt/config/jscs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// https://github.com/jscs-dev/grunt-jscs
module.exports = {
options: {
config: '.jscsrc'
},
plugin: {
files: {
src: [
'js/analyzer.js'
]
}
},
grunt: {
options: {
// We have no control over task names that use underscores
requireCamelCaseOrUpperCaseIdentifiers: 'ignoreProperties'
},
files: {
src: [
'<%= files.grunt %>',
'<%= files.config %>'
]
}
}
};
18 changes: 18 additions & 0 deletions grunt/config/jshint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// https://github.com/gruntjs/grunt-contrib-jshint
module.exports = {
plugin: {
options: {
jshintrc: '.jshintrc'
},
src: '<%= files.js %>'
},
grunt: {
options: {
jshintrc: '.gruntjshintrc'
},
src: [
'<%= files.grunt %>',
'<%= files.config %>'
]
}
};
12 changes: 12 additions & 0 deletions grunt/config/jsonlint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// https://github.com/brandonramirez/grunt-jsonlint
module.exports = {
all: {
src: [
'.gruntjshintrc',
'.jscsrc',
'.jshintrc',
'composer.json',
'package.json'
]
}
};
19 changes: 19 additions & 0 deletions grunt/config/jsvalidate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// https://github.com/ariya/grunt-jsvalidate
module.exports = {
options: {
verbose: true
},
plugin: {
files: {
src: 'js/analyzer.js'
}
},
grunt: {
files: {
src: [
'<%= files.grunt %>',
'<%= files.config %>'
]
}
}
};
21 changes: 21 additions & 0 deletions grunt/config/uglify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// https://github.com/gruntjs/grunt-contrib-uglify
module.exports = {
'wordpres-seo': {
options: {
preserveComments: 'some',
report: 'gzip'
},
files: [{
expand: true,
cwd: 'js',
src: [
'*.js',
'!*.min.js'
],
dest: 'js',
ext: '.min.js',
extDot: 'first',
isFile: true
}]
}
};
Loading