Skip to content

Commit

Permalink
Merge pull request #374 from adamwdraper/develop
Browse files Browse the repository at this point in the history
Develop 1.5.4
  • Loading branch information
adamwdraper authored Nov 21, 2016
2 parents 7b5c9ba + 5d2023e commit 0b027ac
Show file tree
Hide file tree
Showing 63 changed files with 4,153 additions and 3,403 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ Icon
# --------------------
# App Files
# --------------------
node_modules/
node_modules/
.sass-cache
60 changes: 51 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,36 @@ module.exports = function(grunt) {
});

grunt.initConfig({
nodeunit : {
all : ['tests/**/*.js']
mochaTest : {
all: [
'tests/numeral/*.js',
'tests/languages/*.js'
]
},
karma: {
options: {
files: [
'numeral.js',
'languages/*.js',
'tests/numeral/*.js',
'tests/languages/*.js'
],
frameworks: [
'mocha',
'chai'
],
singleRun: true,
autoWatch: false
},
local: {
browsers: [
'Chrome',
'Firefox'
]
},
ci: {
configFile: 'karma-ci.conf.js'
}
},
uglify: {
my_target: {
Expand All @@ -35,7 +63,7 @@ module.exports = function(grunt) {
concat: {
languages: {
src: [
'languages/**/*.js'
'languages/*.js'
],
dest: 'languages.js'
}
Expand All @@ -44,7 +72,7 @@ module.exports = function(grunt) {
all: [
'Gruntfile.js',
'numeral.js',
'languages/**/*.js'
'languages/*.js'
],
options: {
'node': true,
Expand All @@ -64,28 +92,42 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-karma');

grunt.registerTask('default', [
'test'
]);

grunt.registerTask('test', [
'jshint',
'nodeunit'
'mochaTest',
'karma:local'
]);

grunt.registerTask('test:npm', [
'jshint',
'mochaTest'
]);

grunt.registerTask('test:browser', [
'jshint',
'karma:local'
]);

// P
grunt.registerTask('build', [
'jshint',
'nodeunit',
'concat',
'uglify'
]);

// Travis CI task.
grunt.registerTask('travis', ['test']);
grunt.registerTask('travis', [
'jshint',
'mochaTest',
'karma:ci'
]);
};
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012 Adam Draper
Copyright (c) 2014 Adam Draper

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,23 @@ Develop [![Build Status](https://travis-ci.org/adamwdraper/Numeral-js.svg?branch

# Contributing

Please submit all pull requests to the `develop` branch.
#### Please submit all pull requests to the `develop` branch.

1. Fork the library

2. [Install grunt](http://gruntjs.com/getting-started#installing-the-cli)

3. Run `npm install` to install dependencies

4. Add your tests to the files in `/tests`
4. Create a new branch from `develop`

5. To test your tests, run `grunt`
5. Add your tests to the files in `/tests`

6. When all your tests are passing, run `grunt build` to minify all files
6. To test your tests, run `grunt`

7. Submit a pull request to the `develop` branch.
7. When all your tests are passing, run `grunt build` to minify all files

8. Submit a pull request to the `develop` branch.


### Languages
Expand All @@ -45,6 +47,22 @@ See [the english unit tests](https://github.com/adamwdraper/Numeral-js/blob/mast

# Changelog

### 1.5.4

Tests: Changed all tests to use Mocha and Chai

Tests: Added browser tests for Chrome, Firefox, and IE using saucelabs

Added reset function to reset numeral to default options

Added nullFormat option

Update reduce polyfill

Added Binary bytes

Bug fix: Fixes problem with many optional decimals

### 1.5.3

Added currency symbol to optionally appear before negative sign / open paren
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "numeral",
"repo": "adamwdraper/Numeral-js",
"version": "1.5.3",
"version": "1.5.4",
"description": "Format and manipulate numbers.",
"keywords": [
"numeral",
Expand All @@ -13,4 +13,4 @@
],
"scripts": [ "numeral.js" ],
"main": "numeral.js"
}
}
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "numeral",
"repo": "adamwdraper/Numeral-js",
"version": "1.5.3",
"version": "1.5.4",
"description": "Format and manipulate numbers.",
"keywords": [
"numeral",
Expand Down
41 changes: 41 additions & 0 deletions karma-ci.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = function(config) {
var customLaunchers = {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
version: '50',
platform: 'OS X 10.11'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '45',
platform: 'OS X 10.11'
},
sl_ie: {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '11.103',
platform: 'Windows 10'
}
};

process.env.SAUCE_USERNAME = 'numeraljs';
process.env.SAUCE_ACCESS_KEY = '5506968c-cfdc-4797-ba75-294620ad475f';

config.set({
reporters: [
'mocha',
'saucelabs'
],
browserDisconnectTimeout : 10000,
browserNoActivityTimeout: 120000,
browserDisconnectTolerance : 1,
browsers: Object.keys(customLaunchers),
sauceLabs: {
testName: 'Web App Unit Tests'
},
customLaunchers: customLaunchers,
singleRun: true
});
};
Loading

0 comments on commit 0b027ac

Please sign in to comment.