Skip to content

Instantly share code, notes, and snippets.

@victor-shelepen
Created October 4, 2016 09:16
Show Gist options
  • Save victor-shelepen/3e2e2238b05405676c6d839c10e8563e to your computer and use it in GitHub Desktop.
Save victor-shelepen/3e2e2238b05405676c6d839c10e8563e to your computer and use it in GitHub Desktop.
It concatanates libraries and wraps them into closure defining dependencies.
var
gulp = require('gulp'),
concat = require('gulp-concat'),
wrap = require("gulp-wrap");
gulp.task('scripts', function() {
gulp
.src([
'./js/modernizr.js',
'./js/webflow.js'
])
.pipe(concat('webflow-pack.js'))
.pipe(wrap(';(function($) {\n <%= data.contents %> \n})(jq220);', { variable: 'data' }))
.pipe(gulp.dest('./js'))
});
@victor-shelepen
Copy link
Author

It make Webflow to work with Drupal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment