{"id":16964912,"url":"https://github.com/garrytrinder/sp-require","last_synced_at":"2025-08-18T11:43:37.659Z","repository":{"id":95562073,"uuid":"49492443","full_name":"garrytrinder/sp-require","owner":"garrytrinder","description":"Integrating RequireJS with SharePoint","archived":false,"fork":false,"pushed_at":"2020-12-25T00:02:35.000Z","size":26332,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T12:27:40.788Z","etag":null,"topics":["requirejs","sharepoint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garrytrinder.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-12T10:24:04.000Z","updated_at":"2024-11-16T00:21:17.000Z","dependencies_parsed_at":"2023-04-13T00:16:19.735Z","dependency_job_id":null,"html_url":"https://github.com/garrytrinder/sp-require","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrytrinder%2Fsp-require","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrytrinder%2Fsp-require/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrytrinder%2Fsp-require/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garrytrinder%2Fsp-require/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garrytrinder","download_url":"https://codeload.github.com/garrytrinder/sp-require/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244837005,"owners_count":20518551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["requirejs","sharepoint"],"created_at":"2024-10-13T23:44:34.480Z","updated_at":"2025-03-21T17:27:31.448Z","avatar_url":"https://github.com/garrytrinder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sp-require\n\nThis repository aims to integrate the RequireJS file loader with **SharePoint 2013** and **Office 365**. It was borne out of a discussion following the demo of the [OfficePnP Core.JavaScript](https://github.com/OfficeDev/PnP/tree/master/Samples/Core.JavaScript) pattern by Patrick Rodgers.\n\nThe code in this repository is provided as-is and is not intended to be a fully working solution, it is for demo purposes only.\n\n## Instructions\n\n1. Copy the contents of the **sprequire** folder to Style Library\n2. Inject a reference to the **init.js** file (recommended via a UserCustomAction)\n4. Update URLs to match your own site collection on lines 19 \u0026 36 of **init.js**\n5. Update URL to match your own site collection on line 12 of **spweb.js**\n6. Import YouTube webpart (in **build**) into Web Part Gallery\n\n*The code has been tested on a SharePoint 2013 SP1 team site with MDS enabled, however this should work on an Office 365 team site (untested)*\n\nIf all goes well, you should see lots of console messages from the require code as well as a Quick Launch dropdown showing under the SharePoint Search control. \n\nThe Quick Launch is an example of functionality loaded only once, add the YouTube web part to a page and save it to test content that is not always on the page.\n\nAs well as showing how RequireJS could work in a SharePoint site to load functionality into pages, this demo also shows how you can use Handlebars templates and load dynamic CSS within modules through RequireJS plugins.\n\n## Demo\n\n[![sp-require](https://j.gifs.com/wpVYoX.gif)](https://www.youtube.com/watch?v=M23otQN-6MA)\n\n*Click above gif to open full video on YouTube*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrytrinder%2Fsp-require","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarrytrinder%2Fsp-require","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarrytrinder%2Fsp-require/lists"}