How to use the elm/platform.executablePaths function in elm

To help you get started, we’ve selected a few elm 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 jaredpalmer / razzle / packages / razzle-plugin-elm / index.js View on Github external
pathToMake: require('elm/platform').executablePaths['elm-make'],
            forceWatch: true,
          },
        },
      ],
    });
  } else {
    // Production
    config.module.rules.push({
      test: /\.elm$/,
      exclude: [/elm-stuff/, /node_modules/],
      use: [
        {
          loader: require.resolve('elm-webpack-loader'),
          options: {
            pathToMake: require('elm/platform').executablePaths['elm-make'],
          },
        },
      ],
    });
  }

  return config;
};
github jaredpalmer / razzle-react-vue-elm-php-lol / 04-react-vue-elm-php / razzle.config.js View on Github external
config.resolve.extensions.push('.elm');

    if (dev) {
      config.module.rules.push({
        test: /\.elm$/,
        exclude: [/elm-stuff/, /node_modules/],
        use: [
          // {
          //   loader: 'elm-hot-loader',
          // },
          {
            loader: 'elm-webpack-loader',
            options: {
              verbose: true,
              warn: true,
              pathToMake: require('elm/platform').executablePaths[
                'elm-make'
              ],
              forceWatch: true,
            },
          },
        ],
      });
    } else {
      // Production
      config.module.rules.push({
        test: /\.elm$/,
        exclude: [/elm-stuff/, /node_modules/],
        use: [
          {
            loader: 'elm-webpack-loader',
            options: {
github jaredpalmer / razzle / examples / with-elm / razzle.config.js View on Github external
pathToMake: require('elm/platform').executablePaths['elm-make'],
              forceWatch: true,
            },
          },
        ],
      });
    } else {
      // Production
      appConfig.module.rules.push({
        test: /\.elm$/,
        exclude: [/elm-stuff/, /node_modules/],
        use: [
          {
            loader: 'elm-webpack-loader',
            options: {
              pathToMake: require('elm/platform').executablePaths['elm-make'],
            },
          },
        ],
      });
    }

    return appConfig;
  },
};
github kindlyops / havengrc / webui / config / paths.js View on Github external
const servedUrl =
    envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
  return ensureSlash(servedUrl, true);
}

module.exports = {
  appPath: resolveApp('.'),
  appPublic: resolveApp('./public'),
  appHtml: resolveApp('./public/index.html'),
  appIndexJs: resolveApp('./src/index.js'),
  appSrc: resolveApp('./src'),
  dotenv: resolveApp('./.env'),
  entry: resolveApp('./src/index.js'),
  appBuild: resolveApp('./build'),
  elmPackageJson: resolveApp('./elm-package.json'),
  elmMake: require('elm/platform').executablePaths['elm-make'],
  publicUrl: getPublicUrl(resolveApp('elm-package.json')),
  servedPath: getServedPath(resolveApp('elm-package.json'))
};
github purecloudlabs / iframe-coordinator / js-extra / demo-app / config / paths.js View on Github external
return ensureSlash(servedUrl, true);
}

module.exports = {
  appPath: resolveApp('.'),
  appPublic: resolveApp('./public'),
  appHtml: resolveApp('./public/index.html'),
  appIndexJs: resolveApp('./src/index.js'),
  componentLibJs: resolveApp('./src/libs/componentLib.js'),
  coordinatorLibJs: resolveApp('./src/libs/coordinatorLib.js'),
  appSrc: resolveApp('./src'),
  dotenv: resolveApp('./.env'),
  entry: resolveApp('./src/index.js'),
  appBuild: resolveApp('./build'),
  elmPackageJson: resolveApp('./elm-package.json'),
  elmMake: require('elm/platform').executablePaths['elm-make'],
  publicUrl: getPublicUrl(resolveApp('elm-package.json')),
  servedPath: getServedPath(resolveApp('elm-package.json'))
};