Remove big.js from source, use npm instead

This commit is contained in:
Aaron Lindsay 2016-02-13 17:06:32 -05:00
parent c5bca50113
commit 00a6965e88
7 changed files with 7 additions and 53 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.swp
static/bundle.js
static/react-widgets

4
README
View File

@ -9,5 +9,5 @@ $ sudo pacman -S npm
Install browserify globally:
$ sudo npm install -g browserify
Next, install browserify, babel, react, react-bootstrap, react-widgets, and globalize in our directory using npm:
$ cd static && npm install browserify react react-dom react-addons-update react-bootstrap react-widgets babelify babel-preset-react globalize cldr-data
Next, install browserify, babel, react, react-bootstrap, react-widgets, globalize, and big.js in our directory using npm:
$ npm install browserify react react-dom react-addons-update react-bootstrap react-widgets babelify babel-preset-react globalize cldr-data big.js

View File

@ -23,6 +23,8 @@ var Glyphicon = ReactBootstrap.Glyphicon;
var DateTimePicker = require('react-widgets').DateTimePicker;
var Combobox = require('react-widgets').Combobox;
var Big = require('big.js');
var models = require('./models.js');
var Security = models.Security;
var Account = models.Account;

View File

@ -1,3 +1,5 @@
var Big = require('big.js');
function getJSONObj(json_input) {
if (typeof json_input == "string")
return $.parseJSON(json_input)

File diff suppressed because one or more lines are too long

View File

@ -1,49 +0,0 @@
/*!
Copyright (c) 2015 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
(function () {
'use strict';
function classNames () {
var classes = '';
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg) continue;
var argType = typeof arg;
if ('string' === argType || 'number' === argType) {
classes += ' ' + arg;
} else if (Array.isArray(arg)) {
classes += ' ' + classNames.apply(null, arg);
} else if ('object' === argType) {
for (var key in arg) {
if (arg.hasOwnProperty(key) && arg[key]) {
classes += ' ' + key;
}
}
}
}
return classes.substr(1);
}
if (typeof module !== 'undefined' && module.exports) {
module.exports = classNames;
} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd){
// AMD. Register as an anonymous module.
define(function () {
return classNames;
});
} else {
window.classNames = classNames;
}
}());

View File

@ -8,7 +8,6 @@
<link rel="stylesheet" href="static/stylesheet.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="static/external/big/big.min.js"></script>
<script type="text/javascript" src="static/bundle.js"></script>