Browse Source

Having linter now test the src files instead of the built output; D3 is now loaded ONLY from node_modules

pull/2046/head
Ændrew Rininsland 8 years ago
parent
commit
f41bff0b22
No known key found for this signature in database
GPG Key ID: ADBCD4C867F9B2DA
  1. 2
      .jshintrc
  2. 2
      Gruntfile.coffee
  3. 2
      package.json
  4. 1
      src/api.region.js
  5. 4
      src/axis.js
  6. 2
      src/class-utils.js
  7. 6
      src/core.js
  8. 4
      src/index.js
  9. 1
      src/title.js

2
.jshintrc

@ -8,7 +8,7 @@
"undef": true,
"unused": true,
"indent": 4,
"esversion": 6,
"eqnull": true,
"expr": true,
"newcap": false,

2
Gruntfile.coffee

@ -8,7 +8,7 @@ module.exports = (grunt) ->
files: ['src/scss/*.scss']
jshint:
c3: 'c3.js'
c3: 'src/**/*.js'
spec: 'spec/*.js'
options:
reporter: require('jshint-stylish')

2
package.json

@ -37,7 +37,7 @@
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-karma": "^0.12.1",
"grunt-sass": "^1.0.0",
"grunt-sass": "^2.0.0",
"jasmine-core": "^2.3.4",
"jshint-stylish": "^2.1.0",
"karma": "^0.13.10",

1
src/api.region.js

@ -1,6 +1,5 @@
import CLASS from './class';
import { c3_chart_fn } from './core';
import { getOption } from './util';
c3_chart_fn.regions = function (regions) {
var $$ = this.internal, config = $$.config;

4
src/axis.js

@ -1,7 +1,7 @@
import CLASS from './class';
import { inherit, API } from './core'
import { inherit, API } from './core';
import { isValue, isFunction, isString, isEmpty } from './util';
import c3_axis from './c3.axis'
import c3_axis from './c3.axis';
export default function Axis(owner) {
API.call(this, owner);

2
src/class-utils.js

@ -1,4 +1,4 @@
import CLASS from './class'
import CLASS from './class';
import { c3_chart_internal_fn } from './core';
c3_chart_internal_fn.generateClass = function (prefix, targetId) {

6
src/core.js

@ -1,3 +1,4 @@
import * as d3 from 'd3';
import Axis from './axis';
import CLASS from './class';
import { isValue, isFunction, isString, isUndefined, isDefined, ceil10, asHalfPixel, diffDomain, isEmpty, notEmpty, getOption, hasValue, sanitise, getPathBox } from './util';
@ -8,8 +9,6 @@ export var c3_chart_fn;
export var c3_chart_internal_fn;
export var c3_chart_internal_axis_fn;
var d3 = window.d3 ? window.d3 : typeof require !== 'undefined' ? require("d3") : undefined;
export function API(owner) {
this.owner = owner;
}
@ -50,7 +49,7 @@ function Chart(config) {
function ChartInternal(api) {
var $$ = this;
$$.d3 = d3
$$.d3 = d3;
$$.api = api;
$$.config = $$.getDefaultConfig();
$$.data = {};
@ -1084,4 +1083,3 @@ c3_chart_internal_fn.hasValue = hasValue;
c3_chart_internal_fn.sanitise = sanitise;
c3_chart_internal_fn.getPathBox = getPathBox;
c3_chart_internal_fn.CLASS = CLASS;

4
src/index.js

@ -1,4 +1,4 @@
import { c3 } from './core'
import { c3 } from './core';
import './polyfill';
@ -55,4 +55,4 @@ import './ua';
import './util';
import './zoom';
export default c3
export default c3;

1
src/title.js

@ -1,4 +1,3 @@
import CLASS from './class';
import { c3_chart_internal_fn } from './core';
c3_chart_internal_fn.initTitle = function () {

Loading…
Cancel
Save