Skip to content
Open
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
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions will-kitchell/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
6 changes: 3 additions & 3 deletions README.md → will-kitchell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Assignment Description
----------------------------------
This assignment will have you create a simple Javascript object that will be exported using the Node modular pattern we went over in class.

Your object should have a function named 'greet' that takes a name as a parameter and returns the string 'hello ' + name
Your object should have a function named 'greet' that takes a name as a parameter and returns the string 'hello ' + name

You should have at least one test that verifies the output of the function.

Expand All @@ -23,7 +23,7 @@ Bonus:
For an extra point, create a command line utility that will be run using node greet.js 'some name' and will pass the input contained in that argument to the greet function and output the result to the screen.

For a second bonus point, write a test that makes sure that the arguments are being processed.


Rubric:
----------------------
Expand All @@ -33,4 +33,4 @@ Proper Submission: 2pts

Mocha/Chai Test: 3pts

Use of Modular Pattern/design of greet object/function: 3pts
Use of Modular Pattern/design of greet object/function: 3pts
29 changes: 29 additions & 0 deletions will-kitchell/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var appFiles = ['index.js', 'lib/**/*.js', 'bin/**/*.js'];
var testFiles = ['./test/**/*.js'];

gulp.task('jshint:test', function(){
return gulp.src(testFiles)
.pipe(jshint({
node: true,
globals: {
describe: true,
it: true,
before: true,
after: true
}
}))
.pipe(jshint.reporter('default'));
});

gulp.task('jshint:app', function(){
return gulp.src(appFiles)
.pipe(jshint({
node: true
}))
.pipe(jshint.reporter('default'));
});

gulp.task('jshint', ['jshint:test', 'jshint:app']);
gulp.task('default', ['jshint']);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You're missing a task that runs mocha tests.

3 changes: 3 additions & 0 deletions will-kitchell/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"use strict";

var greet = require(__dirname + '/lib/greet');
10 changes: 10 additions & 0 deletions will-kitchell/lib/greet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"use strict";

function greet(name) { //create a greet function with an undefined name parameter
return 'hello ' + name;
}

console.log(greet(process.argv[2])); //set the name parameter in the greet function equal to process.argv[2]
module.exports = greet; //export the new greet value


14 changes: 14 additions & 0 deletions will-kitchell/node_modules/chai/.npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

217 changes: 217 additions & 0 deletions will-kitchell/node_modules/chai/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading