ソースを参照

[merge] develop

tags/1.2.0
Prateeksha Singh 7年前
コミット
a0b4719456
15個のファイルの変更1393行の追加98行の削除
  1. +5
    -1
      .babelrc
  2. +14
    -0
      .travis.yml
  3. +42
    -1
      Makefile
  4. +6
    -1
      README.md
  5. +1
    -1
      dist/frappe-charts.min.cjs.js
  6. +1
    -1
      dist/frappe-charts.min.esm.js
  7. +1
    -1
      dist/frappe-charts.min.iife.js.map
  8. +1
    -1
      docs/assets/js/frappe-charts.min.js.map
  9. +8
    -1
      docs/assets/js/index.min.js
  10. +1
    -1
      docs/assets/js/index.min.js.map
  11. +8
    -1
      package.json
  12. +2
    -1
      rollup.config.js
  13. +1
    -1
      src/js/charts/AxisChart.js
  14. +10
    -0
      src/js/utils/test/helpers.test.js
  15. +1292
    -86
      yarn.lock

+ 5
- 1
.babelrc ファイルの表示

@@ -6,5 +6,9 @@
}
}]
],
"plugins": ["external-helpers"]
"env": {
"test": {
"presets": ["env"]
}
}
}

+ 14
- 0
.travis.yml ファイルの表示

@@ -0,0 +1,14 @@
language: node_js

node_js:
- "6"
- "8"

before_install:
- make install

script:
- make test

after_success:
- make coveralls

+ 42
- 1
Makefile ファイルの表示

@@ -1,4 +1,45 @@
-include .env

BASEDIR = $(realpath .)
BASEDIR = $(realpath .)

SRCDIR = $(BASEDIR)/src
DISTDIR = $(BASEDIR)/dist
DOCSDIR = $(BASEDIR)/docs

PROJECT = frappe-charts

NODEMOD = $(BASEDIR)/node_modules
NODEBIN = $(NODEMOD)/.bin

build: clean install
$(NODEBIN)/rollup \
--config $(BASEDIR)/rollup.config.js \
--watch=$(watch)

clean:
rm -rf \
$(BASEDIR)/.nyc_output \
$(BASEDIR)/.yarn-error.log

clear

install.dep:
ifeq ($(shell command -v yarn),)
@echo "Installing yarn..."
npm install -g yarn
endif

install: install.dep
yarn --cwd $(BASEDIR)

test: clean
$(NODEBIN)/cross-env \
NODE_ENV=test \
$(NODEBIN)/nyc \
$(NODEBIN)/mocha \
--require $(NODEMOD)/babel-register \
--recursive \
$(SRCDIR)/js/**/test/*.test.js

coveralls:
$(NODEBIN)/nyc report --reporter text-lcov | $(NODEBIN)/coveralls

+ 6
- 1
README.md ファイルの表示

@@ -1,6 +1,8 @@
<div align="center">
<img src="https://github.com/frappe/design/blob/master/logos/charts-logo.svg" height="128">
<h2>Frappe Charts</h2>
<a href="https://frappe.github.io/charts">
<h2>Frappe Charts</h2>
</a>
<p align="center">
<p>GitHub-inspired modern, intuitive and responsive charts with zero dependencies</p>
<a href="https://frappe.github.io/charts">
@@ -10,6 +12,9 @@
</div>

<p align="center">
<a href="https://travis-ci.org/frappe/charts">
<img src="https://img.shields.io/travis/frappe/charts.svg?style=flat-square">
</a>
<a href="http://github.com/frappe/charts/tree/master/dist/js/frappe-charts.min.iife.js">
<img src="http://img.badgesize.io/frappe/charts/master/dist/frappe-charts.min.iife.js.svg?compression=gzip">
</a>


+ 1
- 1
dist/frappe-charts.min.cjs.js
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 1
- 1
dist/frappe-charts.min.esm.js
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 1
- 1
dist/frappe-charts.min.iife.js.map
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 1
- 1
docs/assets/js/frappe-charts.min.js.map
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 8
- 1
docs/assets/js/index.min.js ファイルの表示

@@ -46,6 +46,12 @@ var HEATMAP_COLORS_YELLOW = ['#ebedf0', '#fdf436', '#ffc700', '#ff9100', '#06001

// Universal constants

/**
* Returns the value of a number upto 2 decimal places.
* @param {Number} d Any number
*/


/**
* Returns whether or not two given arrays are equal.
* @param {Array} arr1 First array
@@ -114,7 +120,6 @@ var MONTH_NAMES_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",



// https://stackoverflow.com/a/11252167/6495043


function clone(date) {
@@ -294,6 +299,8 @@ var heatmapData = {
end: end
};

// ================================================================================

var c1 = document.querySelector("#chart-composite-1");
var c2 = document.querySelector("#chart-composite-2");



+ 1
- 1
docs/assets/js/index.min.js.map
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 8
- 1
package.json ファイルの表示

@@ -36,16 +36,22 @@
"autoprefixer": "^8.2.0",
"babel-core": "^6.26.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-istanbul": "^4.1.5",
"babel-preset-env": "^1.6.1",
"babel-preset-latest": "^6.24.1",
"clean-css": "^4.1.11",
"babel-register": "^6.26.0",
"coveralls": "^3.0.0",
"cross-env": "^5.1.4",
"cssnano": "^3.10.0",
"eslint": "^4.18.2",
"fs": "0.0.1-security",
"livereload": "^0.6.3",
"mocha": "^5.0.5",
"node-sass": "^4.7.2",
"npm-run-all": "^4.1.1",
"postcss": "^6.0.21",
"nyc": "^11.6.0",
"postcss-cssnext": "^3.0.2",
"postcss-nested": "^2.1.2",
"precss": "^3.1.2",
@@ -59,5 +65,6 @@
"rollup-plugin-uglify-es": "0.0.1",
"rollup-watch": "^4.3.1"
},
"dependencies": {}
"dependencies": {
}
}

+ 2
- 1
rollup.config.js ファイルの表示

@@ -71,7 +71,8 @@ export default [
]
}),
babel({
exclude: 'node_modules/**'
exclude: 'node_modules/**',
plugins: ['external-helpers']
}),
replace({
exclude: 'node_modules/**',


+ 1
- 1
src/js/charts/AxisChart.js ファイルの表示

@@ -375,7 +375,7 @@ export default class AxisChart extends BaseChart {
xPos: s.xAxis.positions[index],
values: values,
yExtreme: s.yExtremes[index],
}
};
});
}



+ 10
- 0
src/js/utils/test/helpers.test.js ファイルの表示

@@ -0,0 +1,10 @@
const assert = require('assert')
const helpers = require('../helpers')

describe('utils.helpers', () => {
it('should return a value fixed upto 2 decimals', () => {
assert.equal(helpers.floatTwo(1.234), 1.23);
assert.equal(helpers.floatTwo(1.456), 1.46);
assert.equal(helpers.floatTwo(1), 1.00);
});
});

+ 1292
- 86
yarn.lock
ファイル差分が大きすぎるため省略します
ファイルの表示


読み込み中…
キャンセル
保存