Skip to content
Snippets Groups Projects
Commit 4df01029 authored by Kevin Hill's avatar Kevin Hill
Browse files

renaming all es6 to js

parent 5808fe80
No related branches found
No related tags found
No related merge requests found
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Loading
Loading
@@ -7,7 +7,6 @@ import uglify from 'gulp-uglify';
import babelify from 'babelify';
import watchify from 'watchify';
import streamify from 'gulp-streamify';
import versionify from 'browserify-versionify';
import { dest } from 'gulp';
import { log } from 'gulp-util';
import { red, green } from 'chalk';
Loading
Loading
@@ -17,7 +16,7 @@ const browserSync = createBrowserSync();
 
let bundler = browserify({
debug: true,
entries: ['./src/lava.entry.es6'],
entries: ['./src/lava.entry.js'],
cache: {},
packageCache: {},
transform: [
Loading
Loading
@@ -46,9 +45,6 @@ function rebundle(prod = false) {
}
 
export default function compile(prod, watch, sync) {
// bundler.transform(babelify, {presets: ['es2015'] });
// bundler.transform(versionify);
if (prod) {
bundler.transform('stripify');
}
Loading
Loading
/* jshint node:true */
 
import {cpus} from 'os'
import {map} from 'bluebird';
import { log } from 'gulp-util';
import { red, green } from 'chalk';
import {readFileSync} from 'fs';
import gulp from 'gulp';
import yargs from 'yargs';
import ext from 'gulp-ext';
import tap from 'gulp-tap';
import babel from 'gulp-babel';
import replace from 'gulp-replace';
import browserify from 'browserify';
import source from 'vinyl-source-stream';
import compile from './gulp-functions/Compile';
import renderChart from './gulp-functions/Renderer';
import getChartTypes from './gulp-functions/GetChartTypes';
const pkg = JSON.parse(readFileSync('./package.json'));
import {cpus} from 'os'
import {map} from 'bluebird';
import { log } from 'gulp-util';
import { red, green } from 'chalk';
 
gulp.task('default', ['dev']);
 
Loading
Loading
/* jshint browser:true */
/* globals __OPTIONS__:true */
 
import LavaJs from './lava/Lava.es6';
import { domLoaded } from './lava/Utils.es6';
import LavaJs from './lava/Lava';
import { domLoaded } from './lava/Utils';
 
/**
* Assign the Lava.js module to the window and
Loading
Loading
Loading
Loading
@@ -8,8 +8,8 @@
* @license MIT
*/
import _forIn from 'lodash/forIn';
import { Renderable } from './Renderable.es6';
import { stringToFunction } from './Utils.es6';
import { Renderable } from './Renderable';
import { stringToFunction } from './Utils';
 
/**
* Chart class used for storing all the needed configuration for rendering.
Loading
Loading
Loading
Loading
@@ -7,8 +7,7 @@
* @copyright (c) 2017, KHill Designs
* @license MIT
*/
import { Renderable } from './Renderable.es6';
import { stringToFunction } from './Utils.es6';
import { Renderable } from './Renderable';
 
/**
* Dashboard class
Loading
Loading
File moved
Loading
Loading
@@ -11,11 +11,11 @@
*/
import _forIn from 'lodash/forIn';
import EventEmitter from 'events';
import Chart from './Chart.es6';
import Dashboard from './Dashboard.es6';
import defaultOptions from './Options.js';
import { noop, addEvent } from './Utils.es6';
import { InvalidCallback, RenderableNotFound } from './Errors.es6'
import Chart from './Chart';
import Dashboard from './Dashboard';
import defaultOptions from './Options';
import { noop, addEvent } from './Utils';
import { InvalidCallback, RenderableNotFound } from './Errors'
 
 
/**
Loading
Loading
/**
* Options module
*
* Default configuration options for using Lava.js as a standalone library.
*
* @module lava/Options
* @author Kevin Hill <kevinkhill@gmail.com>
* @copyright (c) 2017, KHill Designs
* @license MIT
*/
/**
* @type {{auto_run: boolean, locale: string, timezone: string, datetime_format: string, maps_api_key: string, responsive: boolean, debounce_timeout: number}}
*/
const defaultOptions = {
"auto_run" : false,
"locale" : "en",
Loading
Loading
Loading
Loading
@@ -18,8 +18,8 @@
* @property {Function} uuid - Creates identification string for the chart.
* @property {Object} _errors - Collection of errors to be thrown.
*/
import { ElementIdNotFound } from "./Errors.es6";
import { getType } from "./Utils.es6"
import { getType } from "./Utils"
import { ElementIdNotFound } from "./Errors";
 
/**
* Chart module
Loading
Loading
File moved
/**
* Visualization map
*
* This module provides the needed properties for rendering charts retrieved
* by the chart type.
*
* @author Kevin Hill <kevinkhill@gmail.com>
* @copyright (c) 2017, KHill Designs
* @license MIT
*/
/**
* Map of chart types to their visualization package.
*/
const CHART_TYPE_PACKAGE_MAP = {
AnnotationChart : 'annotationchart',
AreaChart : 'corechart',
BarChart : 'corechart',
BubbleChart : 'corechart',
CalendarChart : 'calendar',
CandlestickChart: 'corechart',
ColumnChart : 'corechart',
ComboChart : 'corechart',
DonutChart : 'corechart',
GanttChart : 'gantt',
GaugeChart : 'gauge',
GeoChart : 'geochart',
HistogramChart : 'corechart',
LineChart : 'corechart',
PieChart : 'corechart',
SankeyChart : 'sankey',
ScatterChart : 'corechart',
SteppedAreaChart: 'corechart',
TableChart : 'table',
TimelineChart : 'timeline',
TreeMapChart : 'treemap',
WordTreeChart : 'wordtree'
};
/**
* Map of chart types to their visualization class name.
*/
const CHART_TYPE_CLASS_MAP = {
AnnotationChart : 'AnnotationChart',
AreaChart : 'AreaChart',
BarChart : 'BarChart',
BubbleChart : 'BubbleChart',
CalendarChart : 'Calendar',
CandlestickChart: 'CandlestickChart',
ColumnChart : 'ColumnChart',
ComboChart : 'ComboChart',
DonutChart : 'PieChart',
GanttChart : 'Gantt',
GaugeChart : 'Gauge',
GeoChart : 'GeoChart',
HistogramChart : 'Histogram',
LineChart : 'LineChart',
PieChart : 'PieChart',
SankeyChart : 'Sankey',
ScatterChart : 'ScatterChart',
SteppedAreaChart: 'SteppedAreaChart',
TableChart : 'Table',
TimelineChart : 'Timeline',
TreeMapChart : 'TreeMap',
WordTreeChart : 'WordTree'
};
/**
* Map of chart types to their versions.
*/
const CHART_TYPE_VERSION_MAP = {
AnnotationChart : 1,
AreaChart : 1,
BarChart : 1,
BubbleChart : 1,
CalendarChart : 1.1,
CandlestickChart: 1,
ColumnChart : 1,
ComboChart : 1,
DonutChart : 1,
GanttChart : 1,
GaugeChart : 1,
GeoChart : 1,
HistogramChart : 1,
LineChart : 1,
PieChart : 1,
SankeyChart : 1,
ScatterChart : 1,
SteppedAreaChart: 1,
TableChart : 1,
TimelineChart : 1,
TreeMapChart : 1,
WordTreeChart : 1
};
/**
* Get visualization properties by chart type.
*
* @param chartType
* @return {{pacakge: *, class: *, version: *}}
*/
export default function getVisualizationProps(chartType)
{
return {
pacakge: CHART_TYPE_PACKAGE_MAP[chartType],
class : CHART_TYPE_CLASS_MAP[chartType],
version: CHART_TYPE_VERSION_MAP[chartType]
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment