From 63637ce23e653a36c1d2cee0aa07150b722f3388 Mon Sep 17 00:00:00 2001 From: Pedro Faustino Date: Mon, 31 Dec 2012 20:23:40 +0100 Subject: [PATCH] first commit --- .npmignore | 1 + LICENSE-MIT | 22 ++++++++++++++++++++++ README.md | 27 +++++++++++++++++++++++++++ grunt.js | 40 ++++++++++++++++++++++++++++++++++++++++ lib/icons.js | 14 ++++++++++++++ package.json | 34 ++++++++++++++++++++++++++++++++++ test/icons_test.js | 36 ++++++++++++++++++++++++++++++++++++ 7 files changed, 174 insertions(+) create mode 100644 .npmignore create mode 100644 LICENSE-MIT create mode 100644 README.md create mode 100644 grunt.js create mode 100644 lib/icons.js create mode 100644 package.json create mode 100644 test/icons_test.js diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..2ccbe46 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +/node_modules/ diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 0000000..b1c627d --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2012 Pedro Faustino + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..35f0168 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# icons + +Find the URLs of the site's icons + +## Getting Started +Install the module with: `npm install icons` + +```javascript +var icons = require('icons'); +icons.awesome(); // "awesome" +``` + +## Documentation +_(Coming soon)_ + +## Examples +_(Coming soon)_ + +## Contributing +In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/gruntjs/grunt). + +## Release History +_(Nothing yet)_ + +## License +Copyright (c) 2012 Pedro Faustino +Licensed under the MIT license. diff --git a/grunt.js b/grunt.js new file mode 100644 index 0000000..679043c --- /dev/null +++ b/grunt.js @@ -0,0 +1,40 @@ +module.exports = function(grunt) { + 'use strict'; + + // Project configuration. + grunt.initConfig({ + pkg: '', + test: { + files: ['test/**/*.js'] + }, + lint: { + files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js'] + }, + watch: { + files: '', + tasks: 'default' + }, + jshint: { + options: { + curly: true, + eqeqeq: true, + immed: true, + latedef: true, + newcap: true, + noarg: true, + sub: true, + undef: true, + boss: true, + eqnull: true, + node: true + }, + globals: { + exports: true + } + } + }); + + // Default task. + grunt.registerTask('default', 'lint test'); + +}; diff --git a/lib/icons.js b/lib/icons.js new file mode 100644 index 0000000..62d7479 --- /dev/null +++ b/lib/icons.js @@ -0,0 +1,14 @@ +/* + * icons + * + * https://github.com/pedrofaustino/node-icons + * + * Copyright (c) 2012 Pedro Faustino + * Licensed under the MIT license. + */ + +exports.awesome = function() { + 'use strict'; + + return 'awesome'; +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..1955902 --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "icons", + "description": "Find the URLs of the site's icons", + "version": "0.1.0", + "homepage": "https://github.com/pedrofaustino/node-icons", + "author": { + "name": "Pedro Faustino", + "email": "pedrobandim@gmail.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/pedrofaustino/node-icons.git" + }, + "bugs": { + "url": "https://github.com/pedrofaustino/node-icons/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/pedrofaustino/node-icons/blob/master/LICENSE-MIT" + } + ], + "main": "lib/icons", + "engines": { + "node": ">= 0.6.0" + }, + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "~0.3.17" + }, + "keywords": [] +} diff --git a/test/icons_test.js b/test/icons_test.js new file mode 100644 index 0000000..6d6aae2 --- /dev/null +++ b/test/icons_test.js @@ -0,0 +1,36 @@ +'use strict'; + +var icons = require('../lib/icons.js'); + +/* + ======== A Handy Little Nodeunit Reference ======== + https://github.com/caolan/nodeunit + + Test methods: + test.expect(numAssertions) + test.done() + Test assertions: + test.ok(value, [message]) + test.equal(actual, expected, [message]) + test.notEqual(actual, expected, [message]) + test.deepEqual(actual, expected, [message]) + test.notDeepEqual(actual, expected, [message]) + test.strictEqual(actual, expected, [message]) + test.notStrictEqual(actual, expected, [message]) + test.throws(block, [error], [message]) + test.doesNotThrow(block, [error], [message]) + test.ifError(value) +*/ + +exports['awesome'] = { + setUp: function(done) { + // setup here + done(); + }, + 'no args': function(test) { + test.expect(1); + // tests here + test.equal(icons.awesome(), 'awesome', 'should be awesome.'); + test.done(); + } +};