Skip to content

Instantly share code, notes, and snippets.

@myangel26
myangel26 / gulpfile.js
Created March 19, 2018 08:50 — forked from Tam/gulpfile.js
Minimal Gulp setup w/ LESS +autoprefix/compress, JS +jshint/minify
var gulp = require('gulp'),
sourcemaps = require('gulp-sourcemaps'),
uglify = require("gulp-uglify"),
jshint = require("gulp-jshint"),
rename = require("gulp-rename"),
less = require("gulp-less"),
LessPluginCleanCSS = require('less-plugin-clean-css'),
cleancss = new LessPluginCleanCSS({ advanced: true }),
LessPluginAutoPrefix = require('less-plugin-autoprefix'),
autoprefixer = new LessPluginAutoPrefix({ browsers: ["last 2 versions"] });
@myangel26
myangel26 / loadAsset.js
Created June 7, 2018 13:43 — forked from rolandtoth/loadAsset.js
loadAsset.js CSS/Js loader
function loadAsset(path, callback, o) {
var selector = getUrlParameter('selector', path).replace(/['"]+/g, '').trim(),
async = getUrlParameter('async', path) === 'true',
version = getUrlParameter('v', path),
assetType = 'js',
assetTag = 'script',
assetSrc = 'src',
needAsset = true;