Skip to content

A simple Maven Web Application with usage example of frontend-maven-plugin.

License

Notifications You must be signed in to change notification settings

nicoloboschi/maven-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven-NPM

A simple Maven Web Application with some NodeJS utility.

This application:

  • is a Maven Web Application project.
  • is an example that shows how to use Webpack, Babel, ReactJS, Jest, JSHint (using maven-frontend-plugin) with the only requirement of Maven.

Run application

Being a Maven application, you have simply to run:

    $ mvn clean install

And the deploy the application.

How it works

With maven-frontend-plugin we install project-locally NodeJS and NPM (Node Package Manager).

Then, we run a sequence of npm's scripts, declared in package.json.

NPM Scripts Explanation

JSHint

Simply it runs JSHint, a Javascript code quality tool. JSHint

Webpack

Webpack is module bundler, which is a standard and useful frontend application tool. Webpack

In the mojo, it runs 'npm run webpack' reading webpack.config.js configuration file. It uses babel loader with react-es2015 preset, in order to transpiles all project's react components (they are located in src/jsxcomponents). It creates a single file containing our entire application (build/main.bundle.js).

Jest

It simply run project's test (src/jsxcomponents/Simplelist.test.js) Jest

About

A simple Maven Web Application with usage example of frontend-maven-plugin.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published