Giter Site home page Giter Site logo

foundation-react-template's Introduction

Foundation-React Template

A starter for front-end project using both Foundation and React frameworks. Harubi Front uses this template.

Foundation is a responsive css-based framework. And React is a javascript-based UI framework. Fusing them together will complete a front-end baseline development template, and will lead developers to a different level of possibilities. Foundation uses jQuery so it is a bonus. But use jquery with care so not to snap the advantage of React virtual DOM.

This template comes with a build tool-chain based on Gulp and Webpack. Gulp is a workflow automation tool that streams files through various processors. And Webpack is a file packer that allows javascript codes to be modular. A javascript file can simply require() other javascript file. Webpack will remove the require() statement and merge the content of the required file into the caller script. The merged file can be used in a browser. All javascript files will be packed into a single bundle.js file. Prior to packing, all React jsx files will be preprocessed into js files using React preset in Babel. All Sass files will be compiled into app.css. The tool-chain will build the project and run it in a web browser. It uses Browsersync. All of these processes will be automated by Gulp. Developers will be freed from many repetitive tasks and much time will be saved.

This template is based on npm package. It requires nodejs for the build tool-chain. The resulting distribution files do not need npm or nodejs. The distribution can be installed in a static web server without any server-side dependency. It runs in a browser. It is the front-end.

This template uses versions of Foundation and React as defined in the package.json file. You may want to update them to the latest versions before starting a new project. Please refer to the npm documentation to update packages. Warning: updating a package may break dependencies.

Installation

Clone this repository into a folder

$ git clone https://github.com/chelahmy/foundation-react-template.git my-project
$ cd my-project

and run the following command to download all dependencies including Foundation and React.

$ npm i

How-to

Start the project.

$ npm start

The tool-chain will build the project into the dist folder and run it in a browser. Any changes made in the src folder will trigger the tool-chain to rebuild the project and push the changes to the browser in real time. Remove the dist folder to rebuild the project.

Begin with the src/index.html, src/js/app.js and src/scss/app.scss files. The resulting dist is standalone and can be deployed to a web server.

For building the project without watching the source files and triggering the browser

$ npm run build

Please refer to the Foundation and React websites for detail documentation regarding the individual frameworks.

foundation-react-template's People

Contributors

chelahmy avatar

Watchers

 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.