I hereby claim:
- I am clineamb on github.
- I am clineamb (https://keybase.io/clineamb) on keybase.
- I have a public key ASCCC4-aNiWlOOVjhNW2kwKRp8SUWp8YRANEcWRRx7LN8wo
To claim this, I am signing this object:
/* | |
* LESS-Middleware + Express | |
* Putting this here for now for reference later... | |
* | |
* LESS-Middleware Version 1.0.4 | |
* Express Version Version 4.9.8 | |
* - Caroline, 11/25/2014 | |
* | |
* Dir structure... | |
* /sample-project |
<meta property="fb:app_id" content=""> | |
<meta property="og:type" content="website"> | |
<!-- see: https://developers.facebook.com/docs/reference/opengraph/ for other types --> | |
<meta property="og:url" content="http://..."> | |
<meta property="og:title" content="Your Website - Article"> | |
<meta property="og:image" content="http://...png/jpg/etc"> | |
<meta property="og:description" cotnent="Lorem ipsum dolor est..."> | |
<meta property="og:site_name" content="Your Website"> |
//** found on this thread @ this comment: https://github.com/substack/node-browserify/issues/1044#issuecomment-72384131 **/ | |
var through2 = require('through2'); | |
var gulp = require('gulp'); | |
gulp.task('browserify', function() { | |
gulp.src('./src/index.js') | |
.pipe(through2.obj(function (file, enc, next){ | |
browserify(file.path) | |
.transform('stripify') |
var nunjucks = require('nunjucks') | |
, express = require('express') | |
, app = express() | |
, env | |
; | |
// view engine setup | |
app.set('views', path.join(__dirname, 'views')); | |
env = new nunjucks.Environment( |
I hereby claim:
To claim this, I am signing this object:
/* | |
* Nunjucks + Express | |
* I couldn't find anything that helped me setup the enviornment | |
* correctly for these in the latest vesion of Express 4 (at the time | |
* of writing this). | |
* | |
* This Gist for those that want to keep using Nunjucks with Express 4. | |
* This also goes over working with a Nunjucks environment to use custom | |
* filters, extensions, etc. | |
* |
I made this quick JS console script because I'm pretty bad at comparing things without visuals. Maybe eventually I'll make a PR on DIM so this can be a toggle-able option. For now, here's the raw script and some instructions!
FWIW, I'm on beta.destinyitemmanager.com; don't know if the OG has different markup. YMMV if you use on the original.
/* | |
* For use with the nunjucks templating system | |
* http://mozilla.github.io/nunjucks | |
* | |
* I created a bunch of macros for quickly creating date/time fields. | |
* Import into your nunjucks template: | |
* "{% import "path/to/datefields.nunjucks" as datefields %}" | |
* And use... | |
* {{ datefields.month_select("yo_month", "M", "", "form-control") }} | |
* |