GithubHelp home page GithubHelp logo

template-static_site_builder's Introduction

Template for building HTML/(S)CSS/JS/PHP sites

Provides a basic directory structure and configurable build tasks with Gulp. The master branch will include a few common libraries, but these can be easily removed.

Build Tasks (with Gulp)

Firstly, you will need to run npm install from the root directory to install the necessary gulp packages through node (you'll of course need node installed for this).

Configuration for gulp can be adjusted in gulpfile.js.

Developing with CSS/Sass and JS

Run gulp to run both the CSS and JS tasks as well as start watches so that the tasks will re-run when changes are made to the relevant files.

gulp js will concatenate and minify all scripts whose paths are included in the jsSrc array in the gulp configuration. The concatenation will happen in the same order as the array, so make sure to place dependent scripts after their dependencies. The javascripts will then be placed in the 'js' directory. No watcher is included in this task.

gulp css will compile the SASS found in the file assigned to cssSrc in the gulp configuration ('css/dev/style.scss' by default). Other sass files should be imported into this file for compilation. The compiled CSS will then be minified and placed in the 'css' directory. No watcher is included in this task.

Building the site

First, make sure to add all files that will be necessary in the build to the distFiles array in the gulp configuration.

Second, run gulp build to generate the build files. This should copy all of the necessary files (the ones listed in distFiles) to the buildDir listed in the gulp configuration ('_build' by default, which is also gitignored by default). This task includes deleting the current build directory and its contents, so I strongly suggest never making changes inside this directory.

template-static_site_builder's People

Contributors

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