How to use the vis-dev-utils.generateHeader function in vis-dev-utils

To help you get started, we’ve selected a few vis-dev-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github visjs / vis-network / rollup.config.js View on Github external
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import typescript from 'rollup-plugin-typescript2';
import { terser } from 'rollup-plugin-terser';
import { generateHeader } from "vis-dev-utils";
import assets from 'postcss-assets';
import postcss from 'rollup-plugin-postcss';

// TypeScript because Babel transpiles modules in isolation, therefore no type reexports.
// CommonJS because Babel is not 100 % ESM.

const banner = generateHeader();

const plugins = {
	nodeResolve: nodeResolve({
		extensions: ['.ts', '.js', '.json']
	}),
	typescript: typescript({
		tsconfig: 'tsconfig.code.json'
	}),
	commonjs: commonjs({
		namedExports: {
			'timsort': ['sort']
		}
	}),
	babel: babel({
		extensions: ['.ts', '.js'],
		runtimeHelpers: true
github visjs / vis-network / rollup.build.js View on Github external
import assets from "postcss-assets";
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import copy from "rollup-plugin-copy";
import { generateHeader } from "vis-dev-utils";
import nodeResolve from "rollup-plugin-node-resolve";
import packageJSON from "./package.json";
import postcss from "rollup-plugin-postcss";
import typescript from "rollup-plugin-typescript2";
import { readFileSync } from "fs";
import { terser } from "rollup-plugin-terser";

const babelrc = JSON.parse(readFileSync("./.babelrc"));
const banner = generateHeader();

export default [].concat.apply(
  [],
  [
    {
      external: {},
      globals: {},
      injectCSS: true,
      input: "lib/index-standalone.ts",
      variant: "standalone"
    },
    {
      external: Object.keys(packageJSON.peerDependencies),
      globals: {
        keycharm: "keycharm",
        moment: "moment",

vis-dev-utils

Development utilities for the Vis family projects.

Apache-2.0
Latest version published 1 year ago

Package Health Score

46 / 100
Full package analysis

Popular vis-dev-utils functions