Giter Site home page Giter Site logo

hackathon's Introduction

HACKATHON - PACIFIC TEAM

A basic template to develop a website based on Bootstrap 4

First time installation

Install latest node.js

Install gulp-cli globally

npm install -g gulp-cli

Install all packages from package.json locally

npm install

Development

To develop with automatic compilation and browser refreshing run

gulp

And see the result on http://localhost:3000/

Build

To build everything once (in /dist/ folder)

gulp build

CSS (Sass preprocessor)

index.css is compiled from src/scss/index.scss by Sass.

In the case you don't know Scss syntax or don't want to use it just type plain CSS in src/scss/_base.scss.

HTML (Twig templates)

HTML is generated from Twig.js templates (JavaScript impementation of Twig templating language) in src/templates.

You don't need to leverage the power of templates. You can just create plain HTML files with *.twig extension.

Start templates that are not pages with _. Typically these are templates used for include or extend.

Documentation for Twig.

Warning: Twig.js doesn't implement 100% of Twig.

If you need some data to be available in all templates, use templates/data.json for that.

Static files (JavaScript, images, …)

Folders and files from /src/static/ are just copied directly to /dist/ folder.

Libraries

This website is made with Bootstrap 4 beta.

You can comment out components you don't need in /src/index.scss.

/src/_custom-bootstrap-variables.scss contains only customized Bootstrap variables.

See gulpfile.js for supported browsers.

Deployment

Upload everything in /dist/ folder to the server.

Surge.sh

You can use surge.sh free service for that.

  1. Install surge client npm install --global surge.
  2. Run surge manually once in /dist: you will create an account with surge.sh.
  3. Set your own domain in gulpfile.js (replace https://my-first-website.surge.sh).
  4. From now on run gulp deploy whenever you want to publish a new version.

If you want multiple people to be able to deploy to the same domain, run surge --add [email protected] for each.

hackathon's People

Contributors

dptorri avatar eddie321 avatar fasmery avatar

Watchers

Daniel Srb avatar James Cloos 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.