Giter Site home page Giter Site logo

phph-site's Introduction

phph-site

Website for www.phphants.co.uk.

For more information, visit us at PHP Hampshire.

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

Installation

PHP Dependencies

git clone https://github.com/phphants/phph-site.git
cd phph-site
composer install

Front end assets

Front end assets are built using Gulp. The two main useful commands are gulp (to watch for changes) and gulp build (a one-off build of front end assets).

Initial setup

First, install gulp-cli globally, if you haven't already:

$ npm install gulp-cli -g

Then just install the local packages:

$ npm install

Watching files for changes

Whilst working on front end assets it is useful to automatically rebuild the CSS/JS. This is the default mode of the Gulpfile.js included, so you can just run gulp directly:

$ gulp
[08:50:54] Using gulpfile ~/workspace/phph-site/gulpfile.js
[08:50:54] Starting 'styles'...
[08:50:54] Finished 'styles' after 17 ms
[08:50:54] Starting 'scripts'...
[08:50:54] Finished 'scripts' after 1.17 ms
[08:50:54] Starting 'build'...
[08:50:54] Finished 'build' after 773 μs
[08:50:54] Starting 'default'...
[08:50:54] Finished 'default' after 14 ms

Press Ctrl+C (Win/Lin) or Cmd+C (Mac) when you are finished to exit Gulp.

One-off build

If you need to build the front end assets just once, you can run gulp build which does the same as gulp but exits immediately after build (no watching files):

$ gulp build
[08:57:52] Using gulpfile ~/workspace/phph-site/gulpfile.js
[08:57:52] Starting 'styles'...
[08:57:52] Finished 'styles' after 17 ms
[08:57:52] Starting 'scripts'...
[08:57:52] Finished 'scripts' after 1.16 ms
[08:57:52] Starting 'build'...
[08:57:52] Finished 'build' after 793 μs
$

Virtual Host

Afterwards, set up a virtual host to point to to the public/ directory of the project. For example in Apache:

<VirtualHost *:80>
  ServerName phph.localhost
  DocumentRoot /path/to/phph-site/public
</VirtualHost>

phph-site's People

Contributors

asgrim avatar lboynton avatar garoevans avatar bobbingwide avatar

Watchers

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