Skip to content

Instantly share code, notes, and snippets.

@gianlucacandiotti
Created August 18, 2016 16:47
Show Gist options
  • Save gianlucacandiotti/4b334e6d44ea3d0f6c721ac6a60c0409 to your computer and use it in GitHub Desktop.
Save gianlucacandiotti/4b334e6d44ea3d0f6c721ac6a60c0409 to your computer and use it in GitHub Desktop.
Little example on how to manage jquery from npm
import jquery from 'jquery';
// IIFE
export default (function(testLib){
testLib(jquery, window, document);
}(function($, w, d){
// Document is still loading, you may initialize some data here for example
$(function() { // Document is ready
console.log('example library');
});
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment