Skip to content

Commit

Permalink
feat: install SearchEngine as module
Browse files Browse the repository at this point in the history
  • Loading branch information
qasimgulzar committed Oct 2, 2024
1 parent 22824c8 commit 754b537
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import SearchEngine from './openedx_search_api/static/django_search_backend/js/search_library.js';

export default SearchEngine;
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,4 @@ SearchEngine.prototype.request = function (url, method, body) {
});
}
// Export for CommonJS, AMD, and Global scope
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = SearchEngine;
} else if (typeof define === 'function' && define.amd) {
define([], function () {
return SearchEngine;
});
} else {
window.SearchEngine = SearchEngine;
}
export default SearchEngine;
27 changes: 27 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "openedx-search-api",
"version": "1.0.0",
"type": "module",
"description": "Openedx search api is implemented to integrate search engines into MFE",
"directories": {
"doc": "docs"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/qasimgulzar/openedx-search-api.git"
},
"keywords": [
"openedx",
"search",
"meilisearch"
],
"author": "Qasim Gulzar",
"license": "ISC",
"bugs": {
"url": "https://github.com/qasimgulzar/openedx-search-api/issues"
},
"homepage": "https://github.com/qasimgulzar/openedx-search-api#readme"
}

0 comments on commit 754b537

Please sign in to comment.