Skip to content

Commit

Permalink
Merge branch 'release/1.0.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminVanRyseghem committed Apr 21, 2015
2 parents 94aa631 + 8a83f88 commit ae04dd9
Show file tree
Hide file tree
Showing 75 changed files with 469 additions and 137 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: node_js
node_js:
- "0.10"
- "0.12"
- "0.10"
- "iojs"
before_script:
- npm install -g grunt-cli
script: grunt travis --verbose
4 changes: 3 additions & 1 deletion CHANGELOG-Numeraljs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
_This is the historical changelog for the [`numeral-js` project](https://github.com/adamwdraper/Numeral-js), which `numbro` is built upon. The `numbro` changelog is at [CHANGELOG.md](CHANGELOG.md)._
_This is the historical changelog for the [`numeral-js`
project](https://github.com/adamwdraper/Numeral-js), which `numbro` is built upon. The `numbro`
changelog is at [CHANGELOG.md](CHANGELOG.md)._


### 1.5.3
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
### 1.0.5

- Improve release process. Thanks @Graham42
- Update the `README` file. Thanks @Graham42
- Add support for filipino. Thanks @Graham42 and @mjmaix
- Add support for farsi. Thanks @Graham42 and @neo13
- Fixes Danish currency symbol. Thanks @Graham42 and @philostler
- Fices npm/bower dependencies. Thanks @BenjaminVanRyseghem
- Numeral-js leftovers clean up. Thanks @uniphil
- Update homepage url. Thanks @BenjaminVanRyseghem
- Rebase on Numeraljs to keep git history. Thanks @uniphil @Graham42

### 1.0.4

Fork `numeraljs` v1.5.3, renaming everything to `numbro`
Expand Down
101 changes: 69 additions & 32 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,73 @@
var fs = require('fs');
var path = require('path');

module.exports = function(grunt) {

var minifiedFiles = {
'min/numbro.min.js' : [
'numbro.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']
pkg: grunt.file.readJSON('package.json'),

concat: {
languages: {
src: [
'languages/**/*.js',
],
dest: 'dist/languages.js',
},
},
uglify: {
my_target: {
files: minifiedFiles
files: [
{ src: [ 'dist/languages.js' ], dest: 'dist/min/languages.min.js', },
{ src: [ 'numbro.js' ], dest: 'dist/min/numbro.min.js', },
].concat( fs.readdirSync('./languages').map(function (fileName) {
var lang = path.basename(fileName, '.js');
return {
src: [path.join('languages/', fileName)],
dest: path.join('dist/min/languages/', lang + '.min.js'),
};
}))
},
options: {
preserveComments: 'some'
}
preserveComments: 'some',
},
},
concat: {
languages: {
src: [
'languages/**/*.js'
bump: {
options: {
files: [
'package.json',
'bower.json',
'component.json',
'numbro.js',
],
dest: 'languages.js'
updateConfigs: ['pkg'],
commit: false,
createTag: false,
push: false,
globalReplace: true,
regExp: new RegExp('([\'|\"]?version[\'|\"]?[ ]*[:=][ ]*[\'|\"]?)(\\d+\\.\\d+\\.\\d+(-\\.\\d+)?(-\\d+)?)[\\d||A-a|.|-]*([\'|\"]?)')
},
},
confirm: {
release: {
options: {
question: 'Are you sure you want to publish a new release' +
' with version <%= pkg.version %>? (yes/no)',
continue: function(answer) {
return ['yes', 'y'].indexOf(answer.toLowerCase()) !== -1;
}
}
}
},
release:{
options: {
bump: false,
commit: false,
tagName: 'v<%= version %>',
},
},
nodeunit: {
all: ['tests/**/*.js'],
},
jshint: {
all: [
'Gruntfile.js',
Expand Down Expand Up @@ -68,6 +96,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-confirm');
grunt.loadNpmTasks('grunt-release');


grunt.registerTask('default', [
'test'
Expand All @@ -78,14 +110,19 @@ module.exports = function(grunt) {
'nodeunit'
]);

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

// wrap grunt-release with confirmation
grunt.registerTask('publish', [
'confirm:release',
'release',
]);


// Travis CI task.
grunt.registerTask('travis', ['test']);
};
};
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 Adam Draper
Copyright (c) 2015 Företagsplatsen

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand All @@ -19,4 +19,4 @@ 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.
OTHER DEALINGS IN THE SOFTWARE.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A javascript library for formatting and manipulating numbers.

# Travis Build Status

Master [![Build Status](https://api.travis-ci.org/foretagsplatsen/numbro.png)](https://travis-ci.org/foretagsplatsen/numbro)
Master [![Build Status](https://travis-ci.org/foretagsplatsen/numbro.svg?branch=master)](https://travis-ci.org/foretagsplatsen/numbro)

Develop [![Build Status](https://travis-ci.org/foretagsplatsen/numbro.png?branch=develop)](https://travis-ci.org/foretagsplatsen/numbro)

Expand All @@ -27,16 +27,19 @@ Please submit all pull requests to the `develop` branch.

4. Add your tests to the files in `/tests`

5. To test your tests, run `grunt`
5. To test your tests, run `grunt test`

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

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

### Languages

### Languages

Languages names follows the Microsoft culture name convention as found [here](https://msdn.microsoft.com/en-us/library/ee825488.aspx).
Languages names follows the Microsoft culture name convention as found
[here](https://msdn.microsoft.com/en-us/library/ee825488.aspx). If Microsoft does not have a code
for the country/locale combination, use the format `lang-locale` where the language code is a 2
letter abbreviation from the list of [ISO 639-1 language
codes](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) and the `localecode` is from the list
of [ISO 3166-1 country codes](http://en.wikipedia.org/wiki/ISO_3166-1)

### Language translations will not be merged without unit tests.

Expand All @@ -50,7 +53,9 @@ See [CHANGELOG.md](CHANGELOG.md).

# Acknowlegements

`numbro` is forked from [Adam Draper](https://github.com/adamwdraper)'s project [Numeral.js](http://numeraljs.com/), which was in turn inspired by and heavily borrowed from [Moment.js](http://momentjs.com).
`numbro` is forked from [Adam Draper](https://github.com/adamwdraper)'s project
[Numeral.js](http://numeraljs.com/), which was in turn inspired by and heavily borrowed from
[Moment.js](http://momentjs.com).


# License
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "numbro",
"repo": "foretagsplatsen/numbro",
"version": "1.0.4",
"version": "1.0.5",
"description": "Format and manipulate numbers.",
"keywords": [
"numeral",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "numbro",
"repo": "foretagsplatsen/numbro",
"version": "1.0.4",
"version": "1.0.5",
"description": "Format and manipulate numbers.",
"keywords": [
"numeral",
Expand Down
Loading

0 comments on commit ae04dd9

Please sign in to comment.