def theme(): """Returns module's webpack bundle. This is a callable function in order to lazy load `current_app` and avoid working outside application context. """ return WebpackBundle( __name__, 'assets', entry={ 'invenio-app-rdm-theme': current_app.config['INSTANCE_THEME_FILE'], 'invenio-app-rdm-search-theme': current_app.config['INSTANCE_SEARCH_THEME_FILE'], 'invenio-app-rdm-search-js': './js/invenio_app_rdm/search/SearchMain/index.js', 'invenio-app-rdm-searchbar-js': './js/invenio_app_rdm/search/SearchBar/index.js' }, dependencies={ # add any additional npm dependencies here... 'axios': '^0.19.0', 'lodash': '^4.17.15', 'path': '^0.12.7', 'prop-types': '^15.7.2', 'qs': '^6.9.1', 'react': '^16.12.0', 'react-dom': '^16.12.0', 'react-redux': '^7.1.3', 'react-searchkit': '^0.17.0', 'redux': '^4.0.5', 'redux-thunk': '^2.3.0', "semantic-ui-css": "^2.4.1", "semantic-ui-react": "^0.88.0" })
def __init__(self, import_name, folder, default=None, themes=None): """Initialize webpack bundle. :param import_name: Name of the module where the WebpackBundle class is instantiated. :param folder: Relative path to the assets. :param default: The default theme to be used when ``APP_THEME`` is not set. :param themes: Dictionary where the keys are theme names and the values are the keyword arguments passed to the ``WebpackBundle`` class. """ assert default and default in themes self.default = default self.themes = {} for theme, bundle in themes.items(): self.themes[theme] = WebpackBundle(import_name, os.path.join(folder, theme), **bundle)
from flask_webpackext import WebpackBundle ils = WebpackBundle( __name__, 'ui/src', entry={ 'app_ils': './invenio_app_ils/index.js', }, dependencies={ "axios": "^0.18.1", "lodash": "^4.17.11", "luxon": "^1.7.1", "node-sass": "^4.10.0", "prop-types": "^15.6.2", "react": "^16.6.3", "react-app-polyfill": "^0.1.3", "react-dom": "^16.6.3", "react-redux": "^5.1.0", "react-router-dom": "^4.3.1", "react-scripts": "2.1.1", "react-searchkit": "0.4.0", "redux": "^4.0.1", "redux-thunk": "^2.3.0", "semantic-ui-css": "^2.4.1", "semantic-ui-react": "^0.83.0", "semantic-ui-calendar-react": "^0.15.0", "terser": "3.14.1" } )
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Open Education Polito. # # fare is free software; you can redistribute it and/or modify it under the # terms of the MIT License; see LICENSE file for more details. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'fare-theme': './scss/fare/theme.scss', 'fare-frontpage': './scss/fare/frontpage.scss', 'fare-footer': './scss/fare/footer.scss', 'fare-search-page': './scss/fare/search-page.scss', 'status-files': './scss/fare/status-files.scss', 'guide': './scss/fare/guide.scss', 'fare-argument': './js/fare/argument.js', }, dependencies={ # add any additional npm dependencies here... })
# # This file is part of HEPData. # Copyright (C) 2016 CERN. # # HEPData is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # HEPData is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with HEPData; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # from flask_webpackext import WebpackBundle submission_js = WebpackBundle( __name__, 'assets', entry={ 'hepdata-submission-js': './js/hepdata_submission.js', 'hepdata-submission-reviewers-uploaders-js': './js/hepdata_submission_reviewers_uploaders.js' } )
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """JS/CSS bundles for ebooks. You include one of the bundles in a page like the example below (using ``base`` bundle as an example): .. code-block:: html {{ webpack['base.js']}} """ from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'rero_ebooks-theme': './scss/rero_ebooks/ebooks.scss', }, dependencies={ })
# # You should have received a copy of the GNU General Public License # along with HEPData; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # # In applying this license, CERN does not # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. from flask_webpackext import WebpackBundle dashboard_js = WebpackBundle( __name__, 'assets', entry={ 'dc': './node_modules/dc/dc.min.css', 'hepdata-dashboard-js': './js/hepdata_dashboard.js', 'hepdata-dashboard-inspire-js': './js/hepdata_dashboard_inspire.js', 'hepdata-dashboard-manage-scripts-js': './js/hepdata_dashboard_manage_scripts.js', 'hepdata-dashboard-submissions-vis-js': './js/hepdata_dashboard_submissions_vis.js' }, dependencies={ "crossfilter": "1.3.12", "d3": "~3.5.12", "d3-tip": "~0.6.7", "dc": "~2.0.0", "typeahead.js": "0.11.1" } )
{% include 'misc/header.py' %} """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ '{{ cookiecutter.project_shortname }}-theme': './scss/{{ cookiecutter.package_name }}/theme.scss', '{{ cookiecutter.project_shortname }}-preview': './js/{{ cookiecutter.package_name }}/previewer.js', }, dependencies={ # add any additional npm dependencies here... } )
""" Webpack module for Geo Knowledge Hub """ from flask_assets import Bundle from flask_webpackext import WebpackBundle js_deposit = bundle1 = WebpackBundle( __name__, './static/', entry={ 'js_deposit': './js/angular/app.js' }, dependencies={ 'angular': '^1.7.7', 'angular-file-upload': '^2.5.0', # External Invenio Files JS 'invenio-files-js': 'git://github.com/inveniosoftware/invenio-files-js#74fbef25f2db2f39995091ed2ccb629f5ced5ac3' } ) css_deposit = WebpackBundle( __name__, './static/', entry={ 'css_deposit': './css/main.css' }, dependencies={} )
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CERN. # # picasso is free software; you can redistribute it and/or modify it under # the terms of the MIT License; see LICENSE file for more details. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'picasso-theme': './scss/picasso/theme.scss', }, dependencies={ # add any additional npm dependencies here... })
.. code-block:: html {{ webpack['base.js']}} """ from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'iroko_base': './js/iroko_theme/base.js', # requires jquery, moment, select2, bootstrap 'iroko_adminlte': './js/iroko_theme/admin.js', 'iroko_theme-admin': './scss/iroko_theme/admin.scss', 'iroko_theme': './scss/iroko_theme/theme.scss', }, dependencies={ 'mdbootstrap': '~4.8.0', 'bootstrap': '~4.3.1', 'font-awesome': '~4.4.0', 'jquery': '~3.2.1', 'moment': '~2.23.0', 'select2': '~4.0.2', 'admin-lte': '~2.4.8', 'popper.js': '^1.14.7' })
# GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle from sonar.config_sonar import SONAR_APP_UI_VERSION theme = WebpackBundle(__name__, 'assets', entry={ 'global-theme': './scss/global/theme.scss', 'usi-theme': './scss/usi/theme.scss', 'hepvs-theme': './scss/hepvs/theme.scss', 'vge-theme': './scss/vge/theme.scss', 'hepbejune-theme': './scss/hepbejune/theme.scss', 'unifr-theme': './scss/unifr/theme.scss', 'preview': './scss/preview.scss', }, dependencies={ 'bootstrap': '^4.3', 'popper.js': '^1.12', 'font-awesome': '^4.0', 'ngx-toastr': '^10.2.0', '@rero/sonar-ui': SONAR_APP_UI_VERSION })
# # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """JS/CSS bundles for rero-ils-ui. You include one of the bundles in a page like the example below (using ``base`` bundle as an example): .. code-block:: html {{ webpack['base.js']}} """ from flask_webpackext import WebpackBundle, WebpackBundleProject from pywebpack import bundles_from_entry_point project = WebpackBundleProject( 'rero_ils', project_folder='webpack_assets', config_path='build/config.json', bundles=bundles_from_entry_point('invenio_assets.webpack'), ) admin = WebpackBundle(__name__, 'assets', entry={ 'admin_ui': './js/admin_ui.js', 'public-search_ui': './js/public-search_ui.js' }, dependencies={ '@rero/rero-ils-ui': '^0.0.1', })
# # RERO MEF # Copyright (C) 2020 RERO # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """JS/CSS bundles for rero-mef. You include one of the bundles in a page like the example below (using ``base`` bundle as an example): .. code-block:: html {{ webpack['base.js']}} """ from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={'global': './scss/rero_mef/mef.scss'}, )
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CERN. # # My site is free software; you can redistribute it and/or modify it under # the terms of the MIT License; see LICENSE file for more details. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'my-site-theme': './scss/my_site/theme.scss', }, dependencies={ # add any additional npm dependencies here... } )
# # HEPData is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # HEPData is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with HEPData; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # from flask_webpackext import WebpackBundle search_js = WebpackBundle(__name__, 'assets', entry={ 'hepdata-search-js': './js/hepdata_search.js', 'hepdata-search-facets-js': './js/hepdata_search_facets.js', }, dependencies={ "d3": "~3.5.12", "d3-tip": "~0.6.7", "typeahead.js": "0.11.1" })
def bundles(): """Webpack bundles.""" return ( WebpackBundle(__name__, 'bundle1', entry={'app1': './app1.js'}), WebpackBundle(__name__, 'bundle2', entry={'app2': './app2.js'}), )
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CERN. # # Index Sync Example is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'index-sync-example-theme': './scss/index_sync_example/theme.scss', }, dependencies={ # add any additional npm dependencies here... })
# RERO ID # Copyright (C) 2020 RERO. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/> """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'rero-id-theme': './scss/rero_id/theme.scss', 'rero-id-preview': './js/rero_id/previewer.js', }, dependencies={ # add any additional npm dependencies here... })
# -*- coding: utf-8 -*- # # Copyright (C) 2020 alzp. # # testInvenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'testinvenio-theme': './scss/testinvenio/theme.scss', 'testinvenio-preview': './js/testinvenio/previewer.js', }, dependencies={ # add any additional npm dependencies here... })
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle from sonar.modules.config import SONAR_APP_UI_VERSION theme = WebpackBundle(__name__, 'assets', entry={ 'app': './js/app.js', 'sonar-theme': './scss/sonar/theme.scss', 'unisi-theme': './scss/unisi/theme.scss' }, dependencies={ 'popper.js': '^1.15', 'jquery': '^3.2', 'bootstrap': '^4.3', 'font-awesome': '^4.0', 'ngx-toastr': '^10.2.0', '@rero/sonar-ui': SONAR_APP_UI_VERSION })
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Webpack bundles for Invenio-I18N.""" from flask_webpackext import WebpackBundle i18n = WebpackBundle(__name__, 'assets', entry={'i18n_app': './js/invenio_i18n/app.js'}, dependencies={ 'angular': '~1.4.9', 'angular-gettext': '~2.3.8', })
# In applying this license, CERN does not # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. from flask_webpackext import WebpackBundle record_js = WebpackBundle( __name__, 'assets', entry={ 'hepdata-record-js': './js/hepdata_record_js.js', 'hepdata-code-view-js': './js/hepdata_code_view.js', 'hepdata-common-js': './js/hepdata_common.js', 'hepdata-loaders-js': './js/hepdata_loaders.js', 'hepdata-question-js': './js/hepdata_question.js', 'hepdata-resources-js': './js/hepdata_resources.js', 'hepdata-reviews-js': './js/hepdata_reviews.js', 'hepdata-tables-js': './js/hepdata_tables.js', 'hepdata-vis-common-js': './js/hepdata_vis_common.js', 'hepdata-vis-heatmap-js': './js/hepdata_vis_heatmap.js', 'hepdata-vis-histogram-js': './js/hepdata_vis_histogram.js', 'hepdata-vis-pie-js': './js/hepdata_vis_pie.js', 'hepdata-vis-status-js': './js/hepdata_vis_status.js', }, dependencies={ "clipboard": "~1.5.5", "d3": "~3.5.12", "d3-tip": "~0.6.7" } )
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CERN. # Copyright (C) 2019 Northwestern University. # # Invenio App RDM is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'invenio-app-rdm-theme': './scss/invenio_app_rdm/theme.scss', 'invenio-app-rdm-js': './js/invenio_app_rdm/inveniordm.js', }, dependencies={ # add any additional npm dependencies here... })
# under the terms of the MIT License; see LICENSE file for more details. """JS/CSS bundles for search-ui. You include one of the bundles in a page like the example below (using ``base`` bundle as an example): .. code-block:: html {{ webpack['base.js']}} """ from flask_webpackext import WebpackBundle search_ui = WebpackBundle( __name__, 'assets', entry={ 'search_ui_app': './js/invenio_search_ui/app.js', 'search_ui_theme': './scss/invenio_search_ui/search.scss', }, dependencies={ 'almond': '~0.3.1', 'angular': '~1.4.10', 'angular-loading-bar': '~0.9.0', 'd3': '^3.5.17', 'invenio-search-js': '^1.3.1', 'jquery': '~3.2.1', })
# the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle from sonar.modules.config import SONAR_APP_UI_VERSION theme = WebpackBundle(__name__, 'assets', entry={ 'global-theme': './scss/global/theme.scss', 'usi-theme': './scss/usi/theme.scss', 'preview': './scss/preview.scss', }, dependencies={ 'bootstrap': '^4.3', 'font-awesome': '^4.0', 'ngx-toastr': '^10.2.0', '@rero/sonar-ui': SONAR_APP_UI_VERSION })
# In applying this license, CERN does not # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. """JS/CSS bundles for Previewer.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle previewer = WebpackBundle(__name__, 'assets', entry={ 'd3_csv': './js/csv_previewer/init.js', 'previewer_theme': './scss/style.scss', 'fullscreen_js': './js/fullscreen.js', 'prism_js': './js/prismjs.js', 'prism_css': './scss/prismjs.scss', 'pdfjs_js': './js/pdfjs.js', 'pdfjs_css': './scss/pdfjs.scss', }, dependencies={ 'bootstrap-sass': '~3.4.0', 'd3': '^3.5.17', 'flightjs': '~1.5.1', 'font-awesome': '~4.5.0', 'jquery': '^3.3.1', 'pdfjs-dist': '^1.4.192', 'prismjs': '^1.15.0', }) """Bundle of webpack assets."""
# -*- coding: utf-8 -*- # # Copyright (C) 2019 RERO. # # Swiss Open Access Repository is free software; you can redistribute it # and/or modify it under the terms of the MIT License; see LICENSE file for # more details. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle(__name__, 'assets', entry={ 'app': './js/app.js', 'search_ui': './js/search_ui.js', 'sonar-theme': './scss/sonar/theme.scss', 'usi-theme': './scss/usi/theme.scss' }, dependencies={ 'popper.js': '^1.15', 'jquery': '^3.2', 'bootstrap': '^4.3', 'font-awesome': '^4.0' })
``base`` bundle as an example): .. code-block:: html {{ webpack['base.js']}} """ from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'base': './js/invenio_theme/base.js', # requires jquery, moment, select2, bootstrap 'adminlte': './js/invenio_theme/admin.js', 'theme-admin': './scss/invenio_theme/admin.scss', 'theme': './scss/invenio_theme/styles.scss', }, dependencies={ 'bootstrap-sass': '~3.3.5', 'font-awesome': '~4.4.0', 'jquery': '~3.2.1', 'moment': '~2.9.0', 'select2': '~4.0.2', 'admin-lte': '~2.4.8', })
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CERN. # # CC Vary Header is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """JS/CSS Webpack bundles for theme.""" from __future__ import absolute_import, print_function from flask_webpackext import WebpackBundle theme = WebpackBundle( __name__, 'assets', entry={ 'cc-vary-header-theme': './scss/cc_vary_header/theme.scss', }, dependencies={ # add any additional npm dependencies here... } )