Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-numeral

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-numeral - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

.npmignore

58

index.js
'use strict';
var path = require('path');
module.exports = {
name: 'ember-cli-numeral',
blueprintsPath: function() {
return path.join(__dirname, 'blueprints');
options: {
nodeAssets: {
numeral: function() {
var numeralImport = 'numeral.js';
if (this.hasShimAMDSupport) {
numeralImport = {
path: 'numeral.js',
using: [{ transformation: 'amd', as: 'numeral' }]
};
}
var filesToImport = [numeralImport];
if (this.includeLanguages) {
filesToImport.push('languages.js');
}
return { import: filesToImport };
}
}
},
included: function(app) {
this._super.included(app);
this.app.import(app.bowerDirectory + '/numeral/numeral.js');
this.app.import('vendor/shims/amd.js', {
exports: {
numeral: [
'default'
]
}
});
included: function(app, parentAddon) {
var target = (parentAddon || app);
this.hasShimAMDSupport = ('amdModuleNames' in target);
target.options = target.options || { };
target.options.numeral = target.options.numeral || { includeLanguages: false };
this.includeLanguages = target.options.numeral.includeLanguages;
this._super.included.call(this, target);
if (!this.hasShimAMDSupport) {
target.import('vendor/shims/numeral-amd.js', {
exports: {
type: 'vendor',
numeral: [
'default'
]
}
});
}
}
};
};
{
"name": "ember-cli-numeral",
"version": "0.1.2",
"description": "ember-cli addon support for Numeral.js",
"version": "0.2.0",
"description": "ES6 accessible module for Numeral.js within your Ember applications.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "ember build",
"start": "ember server",
"test": "ember try:each"
},
"repository": {
"type": "git",
"url": "git://github.com/jayphelps/ember-cli-numeral.git"
},
"repository": "http://github.com/josemarluedke/ember-cli-numeral",
"keywords": [
"ember-addon"
],
"author": "Jay Phelps <hello@jayphelps.com>",
"author": "Jay Phelps <hello@jayphelps.com>; Josemar Luedke <josemarluedke@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/jayphelps/ember-cli-numeral/issues"
"homepage": "https://github.com/josemarluedke/ember-cli-numeral",
"dependencies": {
"ember-cli-node-assets": "^0.1.4",
"numeral": "^1.5.3"
},
"homepage": "https://github.com/jayphelps/ember-cli-numeral"
"devDependencies": {
"ember-cli-babel": "^5.1.7",
"ember-cli": "2.10.0-beta.2",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-htmlbars": "^1.0.10",
"ember-cli-jshint": "^2.0.1",
"ember-cli-qunit": "^3.0.1",
"ember-cli-test-loader": "^1.1.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
"loader.js": "^4.0.10"
},
"engines": {
"node": ">= 0.12.0"
},
"ember-addon": {
"configPath": "tests/dummy/config"
}
}

@@ -1,15 +0,16 @@

ember-cli-numeral
=================
# ember-cli-numeral
[![Build Status](https://travis-ci.org/josemarluedke/ember-cli-numeral.svg?branch=master)](https://travis-ci.org/josemarluedke/ember-cli-numeral)
[![Ember Observer Score](https://emberobserver.com/badges/ember-cli-numeral.svg)](https://emberobserver.com/addons/ember-cli-numeral)
[![NPM Version](https://img.shields.io/npm/v/ember-cli-numeral.svg?style=flat-square)](https://www.npmjs.com/package/ember-cli-numeral)
[![Ember badge](https://embadge.io/v1/badge.svg?start=1.13.0)](https://embadge.io/)
ember-cli addon support for Numeral.js
ES6 accessible module for Numeral.js within your Ember applications.
## Install
# Install
```bash
npm install --save-dev ember-cli-numeral;
bower install --save numeral
ember install ember-cli-numeral
```
# Usage
## Usage

@@ -19,6 +20,29 @@ ```javascript

var string = numeral(1000).format('0,0');
let string = numeral(1000).format('0,0');
// '1,000'
```
See the [Numeral.js docs](http://numeraljs.com/) for general usage.
See the [Numeral.js docs](http://numeraljs.com/) for general usage.
## Including Numeral.js languages
To include all the Numeral.js language definitions, you need to add the
following configuration to your `ember-cli-build.js`.
```javascript
var app = new EmberApp(defaults, {
numeral: {
includeLanguages: true
}
});
```
The default configuration is `false`. So languages will not be loaded by default.
## Fastboot compatibility
This addon is compatible with [fastboot](http://ember-fastboot.com/) out of the box.
## License
`ember-cli-numeral` shims is MIT Licensed.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc