Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save johngrant/d8958ed4f51e1285c12b to your computer and use it in GitHub Desktop.
Save johngrant/d8958ed4f51e1285c12b to your computer and use it in GitHub Desktop.
Loading minified and compressed bundles of 3rd party code then my own code.
@section scriptloader {
$script(['https://code.jquery.com/ui/1.9.2/jquery-ui.min.js'], 'jquery-ui');
$script.ready('jquery-ui', function() {
$script([
'@Url.Content("~/bundles/ko-js")',
'@Url.Content("~/bundles/jqueryval")',
'@Url.Content("~/bundles/jquery-cropbox")',
'@Url.Content("~/bundles/jquery-file-upload")',
],'3rd-party');
$script.ready('3rd-party', function() {
$script([
'@Url.Content("~/Scripts/lib/bootstrap3-editable/bootstrap-editable.js")',
'@Url.Content("~/Scripts/lib/nplay/agent/profile/bindings-text-editable.js")',
'@Url.Content("~/Scripts/lib/nplay/agent/profile/bindings-list-editable.js")',
'@Url.Content("~/Scripts/lib/nplay/agent/profile/bindings-selected-objects.js")',
'@Url.Content("~/Scripts/lib/nplay/shared/debounce.js")',
'@Url.Content("~/Scripts/lib/nplay/agent/profile/zipcodes-controller.js")',
'@Url.Content("~/Scripts/lib/nplay/agent/profile/profile.js")',
'@Url.Content("~/Scripts/lib/nplay/services/profile-api.js")',
'@Url.Content("~/Scripts/lib/nplay/agent/profile/profile-controller.js")',
'@Url.Content("~/Scripts/lib/nplay/agent/profile/profileimageupload.js")',
], 'profile-app');
$script.ready('profile-app', function() {
var profile = new nplay.controllers.profile();
profile.initialize().done(function (app) {window.app = app;});
})
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment