Giter Site home page Giter Site logo

d3-test's Introduction

exp-hotsite

This repository contains sources used to compile the static hotsite. It uses Brunch to handle all tasks through a Node container (version 9.2.0). The stack is basically composed of the following dependencies:

  • Babel/ES6
  • React
  • Redux
  • jQuery
  • Twitter Bootstrap
  • Sass support
  • Airbnb ESLint

Installation

  1. Ensure you have Docker installed
  2. Clone this repository
  3. Copy the .env.sample file to .env, editing relevant keys
  4. Run docker-compose build to install all required dependencies.
  5. Run docker-compose up to start the development server
  6. Point your favourite browser to http://localhost:3333

Brunch includes a hot-reload mechanism. Changes should be visible as you save modified files.

Public Assets

The public folder is used by the development server to store precompiled assets and is purged by the build command, when exporting the application for production. Do not place public assets in this folder.

Instead, place them in /app/assets, since the contents of this folder are copied to /public automatically.

Exporting for Production

Notice: Ensure you followed the Installation step at least until step 4

*nix Users

Simply run the build task defined in the Makefile:

$ make build

Windows Users

Run build.bat, contained in this repository.

Notice: Windows users using WSL or Cygwin can also follow the *nix way of building, if desired.

This will clean the public folder (if present), and rebuild the whole application for production use. After the operation is complete, the contents of the aforementioned folder can be uploaded to the preferred hosting service.

Environment Variables

Environment variables are set in the .env file. This file is ignored by git in order to prevent leakage of sensitive information. Please update .env.sample accordingly when adding a new environment key.

Notice: After editing the .env file, please remember to restart your Docker container.

Using environment variables is only available in JavaScript files by using the $PROCESS_ENV_<VARIABLE_NAME> macro. Example:

.env

FOO_BAR=123

somefile.js

console.log($PROCESS_ENV_FOO_BAR);

Output

The macro $PROCESS_ENV_FOO_BAR is automatically replaced with "123" (Notice: Quotes are added automatically)

d3-test's People

Contributors

izanf avatar

Watchers

James Cloos 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.