GithubHelp home page GithubHelp logo

mildanor / js-react-starting-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dpordomingo/js-react-starting-kit

0.0 2.0 0.0 597 KB

Starting a project with Hugo, React, Redux, Webpack, Babel and SASS

License: Apache License 2.0

JavaScript 28.12% HTML 68.99% CSS 2.89%

js-react-starting-kit's Introduction

js-react-starting-kit

Starting a project with Hugo, React, Redux, Webpack, Babel and SASS

  • Hugo is a Go general-purpose website framework that works as a static site generator.
  • React is a JavaScript library providing a view for data rendered as HTML.
  • Redux Redux is a predictable state container for JavaScript apps.
  • Webpack is a JavaScript module bundler that generates static assets representing your module dependencies.
  • Babel Babel is a Javascript ECMAScript 6 to ECMAScript 5 compiler.
  • SASS is a scripting language that is interpreted into CSS

Is a crazy idea to join Hugo and Webpack? Lets see..

Install

You should already have hugo installed in your machine;
You need also npm installed ; then...

npm install -g webpack-dev-server #for development purposes
npm install -g webpack
npm install

Build it:

npm run build

Development server:

At this point, things are different if you are focused in Hugo, or in Webpack:

  • hugo server will serve its stuff from /public folder, so everything should be there: js bundles too
  • webpack-dev-server, will serve the bundles from memory, so no data is writen into /public

Accessing the site through hugo:

Using hugo server, there will be live reload when hugo files changes;
You should build the bundles using webpack -w (because using webpack-dev-server bundles are served from memory)

npm run hugo-server
npm run webpack-watcher

visit: http://localhost:8181

Accessing the site through webpack:

using webpack-dev-server there will be live reload when webpack bundles changes;

npm run hugo-server
npm run webpack-server

visit: http://localhost:8282 or http://localhost:8282/webpack-dev-server/

js-react-starting-kit's People

Contributors

dpordomingo 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.