Giter VIP home page Giter VIP logo

highcharts-assembler's Issues

Error while creating custom Highchart file

I am getting the below error when trying to run custom-builder

➜ node custom-builder.js
fs.js:675
  return binding.read(fd, buffer, offset, length, position);
                 ^

Error: EISDIR: illegal operation on a directory, read
    at Object.fs.readSync (fs.js:675:18)
    at tryReadSync (fs.js:540:20)
    at fs.readFileSync (fs.js:583:19)
    at getFile (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/utilities.js:61:26)
    at getOrderedDependencies (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/dependencies.js:202:19)
    at imports.reduce (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/dependencies.js:220:13)
    at Array.reduce (<anonymous>)
    at getOrderedDependencies (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/dependencies.js:216:18)
    at compileFile (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/dependencies.js:503:24)
    at getIndividualOptions.forEach (/home/xxxx/Development/mastering-dnd/node_modules/highcharts-assembler/src/build.js:129:26)

Import keyword in comments gets replaced

// #2248, #4660
if (!alternateBands[pos]) {
  // Should be imported from PlotLineOrBand.js, but 
  // the import cycle with axis is a problem
  alternateBands[pos] = new H.PlotLineOrBand(axis);
}

becomes

// #2248, #4660
if (!alternateBands[pos]) {
  // Should be imported from PlotLineOrBand.js, but 
  // the                             alternateBands[pos] = new H.PlotLineOrBand(axis);
}

Assembler not working with highcharts 8.0.0

I am attempting to use the highcharts assembler to create a custom bundle. I have noticed it does not work when used as explained in the documents with the newly released version 8.0.0 of highcharts.

When following the example provided here: https://www.highcharts.com/docs/getting-started/how-to-create-custom-highcharts-files I get the following error:

TypeError: Cannot read property 'includes' of null
    at searchCapture (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/dependencies.js:161:18)
    at getModuleName (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/dependencies.js:226:5)
    at compileFile (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/dependencies.js:565:18)
    at getIndividualOptions.forEach (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/build.js:179:20)
    at Array.forEach (<anonymous>)
    at build (/home/andrew/Code/highcharts-master/node_modules/highcharts-assembler/src/build.js:178:8)
    at Object.<anonymous> (/home/andrew/Code/highcharts-master/custom-line-builder.js:7:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)

I was able to run my code successfully when downgrading to 7.2.1 , but my team would like to use 8.0.0

Window not defined in the module, when using JSDom

Since introducing this code in v10

  if (typeof CustomEvent === 'function') {
                window.dispatchEvent(new CustomEvent(
                    'HighchartsModuleLoaded',
                    { detail: { path: path, module: obj[path] } }
                ));
            }

window is not defined when using JSDom.

My idea was to use change it like so

 if (typeof CustomEvent === 'function') {
                Highcharts.win.dispatchEvent(new CustomEvent(
                    'HighchartsModuleLoaded',
                    { detail: { path: path, module: obj[path] } }
                ));
            }

Originally reported here: highcharts/highcharts#21340 (comment)

Vulnerabilities detected in assembler

When running 'gulp', I was recommended to reinstall the highcharts-assembler and got these messages

~/src/highcharts  pr-update-samples-for-website ✗                 9h58m ⚑
▶ npm install highcharts-assembler
+ [email protected]
updated 1 package and audited 4960 packages in 6.787s
found 27 vulnerabilities (15 low, 12 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Can someone update the packages?

Get rid of dependency on js-beautify

js-beautify is used to correct indentation after the source code is bundlend together.
It slows down the build script quite a bit, and is a somewhat unnecessary dependency. Can be replaced with a simple "search and replace" functionality.

Which file is part of each chart

'use strict';  
import Highcharts from '../parts/Globals.js';  
import '../parts/SvgRenderer.js';  
import '../parts/Chart.js';  
import '../parts/Series.js';  
import '../parts/Interaction.js';   
export default Highcharts;  

According to Readme on CREATE A CUSTOM MASTER FILE, it will build the line chart with interaction. But how do i know which parts are used? Is there any documentation about which part should i use for each chart and its functionality?

Move package name under @highcharts

As an internal development tool the package name should become @highcharts/highcharts-assembler to avoid conflicts with the NPM registry.

Modules dependency resolution

Currently we have no link specifying dependencies between distributed bundles. This means that our AMD patterns are incomplete, as it is not possible to require a single module and get all of its dependencies automatically. See highcharts/highcharts#8890

We propose a fix:

  • new tags in doclet in js/masters/: @module @requires
  • assembler has to lookup all @module names in js/masters which are referenced by @requires and can exclude dependent parts
  • extended define like define( _module_name_ , [ _requires_name_ ], () => {})
  • make sure that all @module names start with highcharts to be unique in users use cases
  • remove new tags from bundle result
  • change the UMD pattern so that factory gets an Highcharts property (in all conditional statements), that can be used like this import { Highcharts } from 'highcharts/modules/offline-exporting';

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.