diff --git a/nuxt.config.js b/nuxt.config.js index f68400a208148cbfadd6235fc1a8a49ad29385bd..d8ebb910a6aef2d3fb8137ce85aeede383ca02f6 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -128,5 +128,10 @@ export default { } }, // Build Configuration: https://go.nuxtjs.dev/config-build - build: {}, + build: { + transpile: [ + '@chembl/chembl-elasticsearch-service', + '@chembl/metadata-tags-generator', + ], + }, } diff --git a/package-lock.json b/package-lock.json index d2a8e5543cf807adff070e04366c4715e6590a2f..6a2796f42565d8663d8a47a4307960b11e3c24aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1011,6 +1011,39 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@chembl/chembl-elasticsearch-service": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/@chembl/chembl-elasticsearch-service/-/chembl-elasticsearch-service-0.0.10.tgz", + "integrity": "sha512-BRvIF1Ts1XRujJJKXHE4Gr8YTgQoFm3o3zTydFOU0rnkUpRhC2N9a4TePKoKgSFYY2B1cuEjNESMlRpDWCEopA==", + "requires": { + "axios": "^0.21.1", + "dotenv": "^16.0.0" + }, + "dependencies": { + "dotenv": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz", + "integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==" + } + } + }, + "@chembl/metadata-tags-generator": { + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/@chembl/metadata-tags-generator/-/metadata-tags-generator-0.0.13.tgz", + "integrity": "sha512-58T9PkxNcyaIxBBG6O9j5OxyxooHsNo1JU0knqhPv0MVhAWvebbdpiiqgD0A1Gxq8jfV141JHOKFKGeuCBeNOw==", + "requires": { + "@chembl/chembl-elasticsearch-service": "^0.0.10", + "axios": "^0.21.1", + "dotenv": "^16.0.0" + }, + "dependencies": { + "dotenv": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz", + "integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==" + } + } + }, "@cnakazawa/watch": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", diff --git a/package.json b/package.json index cf5b925383a956f7d3bf323cb593d29ce5b22535..7e469b87c970949295b3817d3ce44a1c7a703293 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,9 @@ "form-data": "^4.0.0", "nuxt": "^2.14.12", "vue-apexcharts": "^1.6.1", - "vue-cookies": "^1.7.4" + "vue-cookies": "^1.7.4", + "@chembl/chembl-elasticsearch-service": "0.0.10", + "@chembl/metadata-tags-generator": "0.0.13" }, "devDependencies": { "@nuxtjs/eslint-config": "^5.0.0", diff --git a/pages/index.vue b/pages/index.vue index 8b3ae31f80cddbc26c4e6f711dc99e4e7079efcc..57e49a84654ee7c48e146c26470da5a549365398 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -44,8 +44,10 @@ </template> <script> +import MetadataTagsGenerator from '@chembl/metadata-tags-generator' import VisualisationsCard from '~/components/mainPage/visualisations/VisualisationsCard.vue' import Sponsors from '~/components/mainPage/sponsors/Sponsors.vue' + export default { components: { VisualisationsCard, @@ -91,6 +93,17 @@ export default { return process.env.GOOGLE_ANALYTICS_ID }, }, + mounted() { + console.log('MOUNTED!') + const itemID = 'CHEMBL4580220' + MetadataTagsGenerator.EUbOPEN.CompoundMetadata.getBioschemasMetadata(itemID) + .then((response) => { + console.log('response: ', response) + }) + .catch((error) => { + console.log('error: ', error) + }) + }, } </script> <style scoped lang="scss">