forked from BenjaminVanRyseghem/numbro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
880e87b
commit b0dd708
Showing
107 changed files
with
8,123 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -------------------- | ||
# OSX Files | ||
# -------------------- | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
Icon | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
# -------------------- | ||
# IntelliJ Files | ||
# -------------------- | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# -------------------- | ||
# Sublime Files | ||
# -------------------- | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
# -------------------- | ||
# App Files | ||
# -------------------- | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
before_script: | ||
- npm install -g grunt-cli | ||
script: grunt travis --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
var fs = require('fs'); | ||
|
||
module.exports = function(grunt) { | ||
|
||
var minifiedFiles = { | ||
'min/numeral.min.js' : [ | ||
'numeral.js' | ||
], | ||
'min/languages.min.js': [ | ||
'languages.js' | ||
] | ||
}; | ||
|
||
// all the lang files need to be added manually | ||
fs.readdirSync('./languages').forEach(function (path) { | ||
var file = path.slice(0, -3), | ||
destination = 'min/languages/' + file + '.min.js', | ||
src = ['languages/' + path]; | ||
|
||
minifiedFiles[destination] = src; | ||
}); | ||
|
||
grunt.initConfig({ | ||
nodeunit : { | ||
all : ['tests/**/*.js'] | ||
}, | ||
uglify: { | ||
my_target: { | ||
files: minifiedFiles | ||
}, | ||
options: { | ||
preserveComments: 'some' | ||
} | ||
}, | ||
concat: { | ||
languages: { | ||
src: [ | ||
'languages/**/*.js' | ||
], | ||
dest: 'languages.js' | ||
} | ||
}, | ||
jshint: { | ||
all: [ | ||
'Gruntfile.js', | ||
'numeral.js', | ||
'languages/**/*.js' | ||
], | ||
options: { | ||
'node': true, | ||
'browser': true, | ||
'curly': true, | ||
'devel': false, | ||
'eqeqeq': true, | ||
'eqnull': true, | ||
'newcap': true, | ||
'noarg': true, | ||
'onevar': true, | ||
'undef': true, | ||
'sub': true, | ||
'strict': false, | ||
'quotmark': 'single' | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-nodeunit'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
|
||
grunt.registerTask('default', [ | ||
'test' | ||
]); | ||
|
||
grunt.registerTask('test', [ | ||
'jshint', | ||
'nodeunit' | ||
]); | ||
|
||
// P | ||
grunt.registerTask('build', [ | ||
'jshint', | ||
'nodeunit', | ||
'concat', | ||
'uglify' | ||
]); | ||
|
||
// Travis CI task. | ||
grunt.registerTask('travis', ['test']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2014 Adam Draper | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,58 @@ | ||
# numbro | ||
a JS library for number formatting | ||
# [numbro](https://numbro-js.com/) | ||
|
||
A javascript library for formatting and manipulating numbers. | ||
|
||
[Website and documentation](http://foretagsplatsen.github.io/numbro) | ||
|
||
|
||
# Travis Build Status | ||
|
||
Master [![Build Status](https://api.travis-ci.org/foretagsplatsen/numbro.png)](https://travis-ci.org/foretagsplatsen/numbro) | ||
|
||
Develop [![Build Status](https://travis-ci.org/foretagsplatsen/numbro.png?branch=develop)](https://travis-ci.org/foretagsplatsen/numbro) | ||
|
||
# NPM | ||
|
||
[![NPM](https://nodei.co/npm/numbro.png?downloads=true)](https://nodei.co/npm/numbro/) | ||
|
||
# Contributing | ||
|
||
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` | ||
|
||
5. To test your tests, run `grunt` | ||
|
||
6. When all your tests are passing, run `grunt build` to minify all files | ||
|
||
7. Submit a pull request to the `develop` branch. | ||
|
||
|
||
### Languages | ||
|
||
Languages names follows the Microsoft culture name convention as found [here](https://msdn.microsoft.com/en-us/library/ee825488.aspx). | ||
|
||
### Language translations will not be merged without unit tests. | ||
|
||
See [the english unit tests](https://github.com/foretagsplatsen/numbro/blob/master/tests/languages/en-GB.js) for an example. | ||
|
||
|
||
# Acknowlegements | ||
|
||
`numbro` is forked from [Adam Draper](https://github.com/adamwdraper)'s project [Numeral.js](http://numeraljs.com/). | ||
|
||
# License | ||
|
||
Copyright © 2015 Företagsplatsen AB | ||
|
||
Distributed under the MIT license. If you want to know more, see the `LICENSE` file. | ||
|
||
The original license file for `Numeral.js` can be found in `LICENSE-Numeraljs` | ||
|
||
`numbro` is distributed under the MIT license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "numbro", | ||
"repo": "foretagsplatsen/numbro", | ||
"version": "1.0.0", | ||
"description": "Format and manipulate numbers.", | ||
"keywords": [ | ||
"numbro", | ||
"number", | ||
"format", | ||
"time", | ||
"money", | ||
"percentage" | ||
], | ||
"scripts": [ "numbro.js" ], | ||
"main": "numbro.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "numbro", | ||
"repo": "foretagsplatsen/numbro", | ||
"version": "1.0.0", | ||
"description": "Format and manipulate numbers.", | ||
"keywords": [ | ||
"numbro", | ||
"number", | ||
"format", | ||
"time", | ||
"money", | ||
"percentage" | ||
], | ||
"scripts": [ "numbro.js" ], | ||
"main": "numbro.js" | ||
} |
Oops, something went wrong.