Skip to content

Instantly share code, notes, and snippets.

Avatar

Yan Sern yansern

View GitHub Profile
@yansern
yansern / gulpfile.js
Created Dec 4, 2016 — forked from Falconerd/gulpfile.js
Gulp + Watchify + Babelify + BrowserSync
View gulpfile.js
/**
* This gulpfile will copy static libraries and a index.html file as well as
* merge, babelify and uglify the rest of the javascript project.
*
* TODO:
* - Separate media, libs and src with different watchers.
* - Media and libs should only be copied to dist if they are different sizes.
*
* The expected project is to be laid out as such:
*
View normalise-path.php
<?php
/**
* Normalise a file path string so that it can be checked safely.
*
* Attempt to avoid invalid encoding bugs by transcoding the path. Then
* remove any unnecessary path components including '.', '..' and ''.
*
* @param $path string
* The path to normalise.
* @param $encoding string
You can’t perform that action at this time.