How to use the google-closure-compiler/package.json.version function in google-closure-compiler

To help you get started, we’ve selected a few google-closure-compiler 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 teppeis / duck / src / batch.ts View on Github external
function defaultBatchOptions(config: DuckConfig): AwsOptions {
  const closureVersion = require("google-closure-compiler/package.json").version;
  const major = semver.major(closureVersion);
  return {
    packageJson: {
      // To suppress npm warnings
      private: true,
      dependencies: {
        [`google-closure-compiler-${getOsForNativeImage(config)}`]: `^${major}.0.0`,
      },
    },
    webpackOptions: {
      externals: [
        /^aws-sdk\/?/,
        "google-closure-compiler-js",
        "google-closure-compiler-linux",
        "google-closure-compiler-osx",
        // used in google-closure-compiler/lib/(grunt|gulp)
        "chalk",