Skip to content

Commit

Permalink
Migrate and modulate utility functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kenany committed May 19, 2013
1 parent 7c18e7b commit fc4e849
Show file tree
Hide file tree
Showing 25 changed files with 1,430 additions and 273 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules/
node_modules
npm-debug.log
21 changes: 0 additions & 21 deletions .jshintrc

This file was deleted.

16 changes: 11 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ['grunt.js', 'primality.js'],
options: grunt.file.readJSON('.jshintrc')
shell: {
build: {
options: {
stdout: true,
stderr: true,
failOnError: true
},
command: 'component build -o dist -n primality -s primality'
}
},
uglify: {
options: {
Expand Down Expand Up @@ -48,10 +54,10 @@ module.exports = function(grunt) {
});
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-shell');

grunt.registerTask('test', ['mocha']);
grunt.registerTask('default', ['test', 'uglify', 'doc']);
grunt.registerTask('default', ['shell:build', 'test', 'uglify', 'doc']);
};
27 changes: 27 additions & 0 deletions component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "primality",
"repo": "KenanY/primality",
"description": "JavaScript library for prime numbers.",
"version": "1.4.0",
"keywords": ["math"],
"main": "primality.js",
"scripts": [
"primality.js",
"lib/util/index.js",
"lib/util/common.js",
"lib/util/createCallback.js",
"lib/util/forIn.js",
"lib/util/identity.js",
"lib/util/indexOf.js",
"lib/util/isArray.js",
"lib/util/isEqual.js",
"lib/util/isFinite.js",
"lib/util/isFunction.js",
"lib/util/isNaN.js",
"lib/util/isNumber.js",
"lib/util/isObject.js",
"lib/util/keys.js",
"lib/util/sortedIndex.js"
],
"license": "MIT"
}
Loading

0 comments on commit fc4e849

Please sign in to comment.