0.0.6 • Published 6 years ago

webpack-vertx-plugin v0.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

npm version npm

Webpack Vertx Plugin

This plugin allows you to extract nashorn modules to your node_modules work directory and on compilation success package your application as a runnable jar.

WARNING

This plugin expects that your already have Apache Maven installed in your system since will interact with it in order to perform its tasks.

Installation

npm install --save-dev webpack-vertx-plugin

Setup

In webpack.config.js:

const WebpackVertxPlugin = require('webpack-vertx-plugin');

module.exports = {
  ...
  ...
  plugins: [
    new WebpackVertxPlugin({extractOnly: false})
  ],
  ...
}

Example

Insert into your webpack.config.js:

const WebpackVertxPlugin = require('webpack-vertx-plugin');
const path = require('path');

var plugins = [];

plugins.push(new WebpackVertxPlugin());

var config = {
  entry: {
    app: path.resolve(__dirname, 'src/app.js')
  },
  output: {
    path: path.resolve(__dirname, 'dist'), // regular webpack
    filename: 'bundle.js'
  },
  devServer: {
    contentBase: path.resolve(__dirname, 'src') // dev server
  },
  plugins: plugins,
  module: {
    loaders: [
      {test: /\.js$/, loaders: 'babel'},
      {test: /\.scss$/, loader: 'style!css!scss?'},
      {test: /\.html$/, loader: 'html-loader'}
    ]
  }
}

module.exports = config;

Config

  • extractOnly: boolean to only extract resources to node_modules (do not execute mvn package in the end of the build). Default: false
  • verbose: boolean to display the maven output. Default: false
  • watchPattern: a ant pattern to pass to vertx when watching for file changes, Default: src/main/resources/**/*
  • verticle: the name of the main verticle.
0.0.6

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago