From 1a6d7d5723bc6c1dd43d59337061b7c438896be1 Mon Sep 17 00:00:00 2001 From: Ya Zhuang Date: Fri, 25 Dec 2015 06:59:29 +0800 Subject: [PATCH] change: package.json enhancement - add `scripts` for something like `npm test` and `npm run grunt` - add missing devDep: `grunt-cli` --- .gitignore | 1 + package.json | 5 + {tests => test}/resumes/jrs-0.0.0/empty.json | 0 .../resumes/jrs-0.0.0/jane-incomplete.json | 0 .../resumes/jrs-0.0.0/jane-q-fullstacker.json | 0 .../resumes/jrs-0.0.0/richard-hendriks.json | 0 test/sandbox/richard-hendriks.json | 130 ++++++++++++++++++ {tests => test}/test-cli.js | 0 {tests => test}/test-converter.js | 0 {tests => test}/test-fresh-sheet.js | 2 +- {tests => test}/test-jrs-sheet.js | 2 +- {tests => test}/test-themes.js | 0 12 files changed, 138 insertions(+), 2 deletions(-) rename {tests => test}/resumes/jrs-0.0.0/empty.json (100%) rename {tests => test}/resumes/jrs-0.0.0/jane-incomplete.json (100%) rename {tests => test}/resumes/jrs-0.0.0/jane-q-fullstacker.json (100%) rename {tests => test}/resumes/jrs-0.0.0/richard-hendriks.json (100%) create mode 100644 test/sandbox/richard-hendriks.json rename {tests => test}/test-cli.js (100%) rename {tests => test}/test-converter.js (100%) rename {tests => test}/test-fresh-sheet.js (97%) rename {tests => test}/test-jrs-sheet.js (97%) rename {tests => test}/test-themes.js (100%) diff --git a/.gitignore b/.gitignore index ce751fe..ee4ba40 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ tests/sandbox/ docs/ +npm-debug.log diff --git a/package.json b/package.json index e8539e2..025892b 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,10 @@ "type": "git", "url": "https://github.com/hacksalot/HackMyResume.git" }, + "scripts": { + "test": "mocha && grunt", + "grunt": "grunt" + }, "keywords": [ "resume", "CV", @@ -61,6 +65,7 @@ "devDependencies": { "chai": "*", "grunt": "*", + "grunt-cli": "^0.1.13", "grunt-contrib-clean": "^0.7.0", "grunt-contrib-jshint": "^0.11.3", "grunt-contrib-yuidoc": "^0.10.0", diff --git a/tests/resumes/jrs-0.0.0/empty.json b/test/resumes/jrs-0.0.0/empty.json similarity index 100% rename from tests/resumes/jrs-0.0.0/empty.json rename to test/resumes/jrs-0.0.0/empty.json diff --git a/tests/resumes/jrs-0.0.0/jane-incomplete.json b/test/resumes/jrs-0.0.0/jane-incomplete.json similarity index 100% rename from tests/resumes/jrs-0.0.0/jane-incomplete.json rename to test/resumes/jrs-0.0.0/jane-incomplete.json diff --git a/tests/resumes/jrs-0.0.0/jane-q-fullstacker.json b/test/resumes/jrs-0.0.0/jane-q-fullstacker.json similarity index 100% rename from tests/resumes/jrs-0.0.0/jane-q-fullstacker.json rename to test/resumes/jrs-0.0.0/jane-q-fullstacker.json diff --git a/tests/resumes/jrs-0.0.0/richard-hendriks.json b/test/resumes/jrs-0.0.0/richard-hendriks.json similarity index 100% rename from tests/resumes/jrs-0.0.0/richard-hendriks.json rename to test/resumes/jrs-0.0.0/richard-hendriks.json diff --git a/test/sandbox/richard-hendriks.json b/test/sandbox/richard-hendriks.json new file mode 100644 index 0000000..b40fac7 --- /dev/null +++ b/test/sandbox/richard-hendriks.json @@ -0,0 +1,130 @@ +{ + "basics": { + "name": "Richard Hendriks", + "label": "Programmer", + "summary": "Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford. (Go Sooners and Cardinals!) Before starting Pied Piper, he worked for Hooli as a part time software developer. While his work focuses on applied information theory, mostly optimizing lossless compression schema of both the length-limited and adaptive variants, his non-work interests range widely, everything from quantum computing to chaos theory. He could tell you about it, but THAT would NOT be a “length-limited” conversation!", + "website": "http://richardhendricks.com", + "phone": "(912) 555-4321", + "email": "richard.hendriks@gmail.com", + "picture": "", + "location": { + "address": "2712 Broadway St", + "postalCode": "CA 94115", + "city": "San Francisco", + "countryCode": "US", + "region": "California" + }, + "profiles": [ + { + "network": "Twitter", + "username": "neutralthoughts", + "url": "" + }, + { + "network": "SoundCloud", + "username": "dandymusicnl", + "url": "https://soundcloud.com/dandymusicnl" + } + ] + }, + "work": [ + { + "company": "Pied Piper", + "website": "http://piedpiper.com", + "position": "CEO/President", + "startDate": "2013-12-01", + "endDate": "2014-12-01", + "summary": "Pied Piper is a multi-platform technology based on a proprietary universal compression algorithm that has consistently fielded high Weisman Scores™ that are not merely competitive, but approach the theoretical limit of lossless compression.", + "highlights": [ + "Build an algorithm for artist to detect if their music was violating copy right infringement laws", + "Successfully won Techcrunch Disrupt", + "Optimized an algorithm that holds the current world record for Weisman Scores" + ] + } + ], + "education": [ + { + "institution": "University of Oklahoma", + "gpa": "4.0", + "courses": [ + "DB1101 - Basic SQL", + "CS2011 - Java Introduction" + ], + "startDate": "2011-06-01", + "endDate": "2014-01-01", + "area": "Information Technology", + "studyType": "Bachelor" + } + ], + "skills": [ + { + "name": "Web Development", + "level": "Master", + "keywords": [ + "HTML", + "CSS", + "Javascript" + ] + }, + { + "name": "Compression", + "level": "Master", + "keywords": [ + "Mpeg", + "MP4", + "GIF" + ] + } + ], + "volunteer": [ + { + "organization": "CoderDojo", + "position": "Teacher", + "startDate": "2012-01-01", + "endDate": "2013-01-01", + "website": "http://coderdojo.com/", + "summary": "Global movement of free coding clubs for young people.", + "highlights": [ + "Awarded 'Teacher of the Month'" + ] + } + ], + "awards": [ + { + "title": "Digital Compression Pioneer Award", + "date": "2014-11-01", + "awarder": "Techcrunch", + "summary": "There is no spoon." + } + ], + "publications": [ + { + "name": "Video compression for 3d media", + "publisher": "Hooli", + "releaseDate": "2014-10-01", + "website": "http://en.wikipedia.org/wiki/Silicon_Valley_(TV_series)", + "summary": "Innovative middle-out compression algorithm that changes the way we store data." + } + ], + "interests": [ + { + "name": "Wildlife", + "keywords": [ + "Ferrets", + "Unicorns" + ] + } + ], + "references": [ + { + "name": "Erlich Bachman", + "reference": "It is my pleasure to recommend Richard, his performance working as a consultant for Main St. Company proved that he will be a valuable addition to any company." + } + ], + "languages": [ + { + "language": "English", + "fluency": "Native speaker" + } + ] +} \ No newline at end of file diff --git a/tests/test-cli.js b/test/test-cli.js similarity index 100% rename from tests/test-cli.js rename to test/test-cli.js diff --git a/tests/test-converter.js b/test/test-converter.js similarity index 100% rename from tests/test-converter.js rename to test/test-converter.js diff --git a/tests/test-fresh-sheet.js b/test/test-fresh-sheet.js similarity index 97% rename from tests/test-fresh-sheet.js rename to test/test-fresh-sheet.js index f35487d..055931a 100644 --- a/tests/test-fresh-sheet.js +++ b/test/test-fresh-sheet.js @@ -50,7 +50,7 @@ describe('jane-doe.json (FRESH)', function () { it('should not be modified after saving', function() { var savedSheet = new FRESHResume().open('tests/sandbox/jane-q-fullstacker.json'); - _sheet.stringify().should.equal( savedSheet.stringify() ) + _sheet.stringify().should.equal( savedSheet.stringify() ); }); it('should validate against the FRESH resume schema', function() { diff --git a/tests/test-jrs-sheet.js b/test/test-jrs-sheet.js similarity index 97% rename from tests/test-jrs-sheet.js rename to test/test-jrs-sheet.js index acd6f2e..86bb7ab 100644 --- a/tests/test-jrs-sheet.js +++ b/test/test-jrs-sheet.js @@ -45,7 +45,7 @@ function testResume( opts ) { it('should not be modified after saving', function() { var savedSheet = new JRSResume().open( 'tests/sandbox/' + opts.title + '.json' ); - _sheet.stringify().should.equal( savedSheet.stringify() ) + _sheet.stringify().should.equal( savedSheet.stringify() ); }); it('should ' + (opts.isValid ? '' : 'NOT ') + 'validate against the JSON Resume schema', function() { diff --git a/tests/test-themes.js b/test/test-themes.js similarity index 100% rename from tests/test-themes.js rename to test/test-themes.js