Giter Site home page Giter Site logo

sweetcard / spring-boot-webpack-es6-react-poc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikaelhg/spring-boot-webpack-es6-react-poc

0.0 2.0 0.0 25 KB

Kotlin + Spring Boot + Webpack + Babel + ReactJS

JavaScript 52.89% CSS 2.87% Kotlin 23.25% HTML 9.36% Java 11.64%

spring-boot-webpack-es6-react-poc's Introduction

POC: Kotlin + Spring Boot + Webpack + Babel + ReactJS

mvn clean package spring-boot:run

The project provides backend services using Spring Boot, and generates a nice clean JavaScript frontend using the Maven Frontend plugin to first fetch a relevant Node.JS binary package, NPM, then run npm install to fetch a shitload of JS modules, and execute WebPack through npm run prod-build.

WebPack goes on to load its Babel.JS module, and configure it with ES2015 and React Babel profiles.

Babel then transpiles the JavaScript input files from shiny new ES2015 to ES5, which shitty browsers can actually run.

WebPack slams all this JavaScript together: the entrypoint JS file set in the configuration file, everything that file imports, and everything THAT imports, ad nauseam, into the (possibly giant) target/classes/static/bundle.js file.

Take a look at the src/main/frontend directory, and the configuration files and ES6 entry point there.

Basically this should work on Linux x86 and x64, Windows 32 and 64 bit, and OSX. Should.

You can also install NVM, have NVM install Node.JS LTS, upgrade your NPM to newest, then run npm install and npm run-script dev-build to manually compile the stuff. It should be pretty easy to set up a watchdog to automatically build things, and trigger LiveReload.

But that's a story to be explored on some other night.

IntelliJ IDEA users

File -> Settings -> Languages & Frameworks -> JavaScript:

JavaScript language version: JSX Harmony

Libraries -> ECMAScript 6: Enabled


File -> Settings -> Build, Execution, Deployment -> Compiler:

Make project automatically: Enabled


CTRL-SHIFT A -> Registry... :

compiler.automake.allow.when.app.running: Enabled

spring-boot-webpack-es6-react-poc's People

Contributors

mikaelhg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.