Smaller Node Plugin Builder

This Maven Mojo creates smaller plugins based on npm-modules for node.js

License

License

BSD
Categories

Categories

Maven Build Tools
GroupId

GroupId

de.matrixweb.smaller
ArtifactId

ArtifactId

smaller-node-builder-maven-plugin
Last Version

Last Version

1.0.9
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Smaller Node Plugin Builder
This Maven Mojo creates smaller plugins based on npm-modules for node.js
Project URL

Project URL

https://github.com/KnisterPeter/smaller-node-builder
Source Code Management

Source Code Management

https://github.com/KnisterPeter/smaller-node-builder

Download smaller-node-builder-maven-plugin

How to add to project

<plugin>
    <groupId>de.matrixweb.smaller</groupId>
    <artifactId>smaller-node-builder-maven-plugin</artifactId>
    <version>1.0.9</version>
</plugin>

Dependencies

compile (9)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.0
org.apache.maven : maven-project jar 2.2.0
org.codehaus.plexus : plexus-utils jar 3.0.1
commons-io : commons-io jar 2.1
org.apache.commons : commons-compress jar 1.5
org.apache.httpcomponents : fluent-hc jar 4.2
org.codehaus.jackson : jackson-mapper-asl jar 1.9.5
org.antlr : stringtemplate jar 4.0.2
org.eclipse.jgit : org.eclipse.jgit jar 3.1.0.201310021548-r

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

test (3)

Group / Artifact Type Version
junit : junit jar 4.11
org.hamcrest : hamcrest-all jar 1.1
org.mockito : mockito-all jar 1.9.0

Project Modules

There are no modules declared in this project.

smaller-node-builder

A maven mojo to create a smaller bundle containing a npm-module

<plugin>
  <groupId>de.matrixweb.smaller</groupId>
  <artifactId>smaller-node-builder-maven-plugin</artifactId>
  <version>1.0.0</version>
  <executions>
    <execution>
      <configuration>
        <!-- browserify is working on js -->
        <type>js</type>
        <name>browserify-2.34.0</name>
        <!-- npm module to prepare for smaller -->
        <packages>
          <package>[email protected]</package>
          <package>[email protected]</package>
        </packages>
        <!-- the bridge script between smaller and browserify -->
        <script>
          var browserify = require('browserify');
          var fs = require('fs');
          var through = require('through');
          var min = '';
          browserify()
            .add(command.path + '/' + command.in)
            .bundle().pipe(through(function write(data) {
                min += data;
              }, function end() {
                fs.writeFileSync(command.out + '/output.js', min);
                done();
              }));
        </script>
      </configuration>
      <goals>
        <goal>smaller-node-builder</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Versions

Version
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0