Example #1
0

main_css = NpmBundle('scss/rero_ils/styles.scss',
                     depends=('scss/rero_ils/*.scss'),
                     filters='node-scss,cleancssurl',
                     output='gen/rero_ils_main.%(version)s.css',
                     npm={
                         'almond': '~0.3.3',
                         'bootstrap': '~4.2.1',
                         'font-awesome': '~4.7.0',
                         'jquery': '~1.9.1',
                     })
"""Main CSS bundle with Bootstrap and Font-Awesome."""

i18n = GlobBundle(
    catalog('messages'),
    filters=AngularGettextFilter(catalog_name='reroilsAppTranslations'),
)

js = NpmBundle('node_modules/almond/almond.js',
               'js/rero_ils/rero_ils.js',
               'js/rero_ils/rero_keep_tab.js',
               filters='requirejs',
               npm={
                   'almond': '~0.3.3',
                   'angular': '~1.6.9',
                   'bootstrap': '~4.2.1',
                   'angular-gettext': '~2.3.8',
                   'jquery': '~1.9.1',
               },
               output='gen/rero_ils.main.%(version)s.js')
Example #2
0
def test_init(testcss):
    """Test glob search."""
    bundle = GlobBundle(os.path.join(os.path.dirname(testcss), '*.css'))
    assert bundle.contents == [testcss]
Example #3
0
             output='gen/search.%(version)s.css')


def catalog(domain):
    """Return glob matching path to tranlated messages for a given domain."""
    return os.path.join(
        resource_filename('invenio_search_ui', 'translations'),
        '*',  # language code
        'LC_MESSAGES',
        '{0}.po'.format(domain),
    )


i18n = GlobBundle(
    catalog('messages-js'),
    filters=AngularGettextFilter(catalog_name='invenioSearchUITranslation'),
    output='gen/translations/invenio-search-ui.js',
)

js = NpmBundle(
    'js/invenio_search_ui/app.js',
    filters='requirejs',
    depends=('node_modules/invenio-search-js/dist/*.js', 'node_modules/d3/*'),
    output='gen/search.%(version)s.js',
    npm={
        "almond": "~0.3.1",
        'angular': '~1.4.10',
        'angular-loading-bar': '~0.9.0',
        'd3': '^3.5.17',
        'invenio-search-js': '~1.1.4',
    },
Example #4
0

def catalog(domain):
    """Return glob matching path to tranlated messages for a given domain."""
    return os.path.join(
        resource_filename('reroils_record_editor', 'translations'),
        '*',  # language code
        'LC_MESSAGES',
        '{0}.po'.format(domain),
    )

catalog_name = 'reroilsRecordEditorTranslations'

i18n = GlobBundle(
    catalog('messages'),
    filters=AngularGettextFilter(catalog_name=catalog_name),
    output='gen/reroils_record_editor.i18n.%(version)s.js',
)

schema_form_js = NpmBundle(
    'node_modules/angular/angular.js',
    'node_modules/angular-sanitize/angular-sanitize.min.js',
    'node_modules/tv4/tv4.js',
    'node_modules/objectpath/lib/ObjectPath.js',
    'node_modules/angular-schema-form/dist/schema-form.js',
    'node_modules/angular-schema-form/dist/bootstrap-decorator.js',
    npm={
        'angular': '~1.6.9',
        'angular-sanitize': '~1.6.9',
        'tv4': '^1.3.0',
        'objectpath': '^1.2.1',
Example #5
0
                          npm={"bootstrap-sass": "~3.3.5"})


def catalog(domain):
    """Return glob matching path to tranlated messages for a given domain."""
    return os.path.join(
        resource_filename('rerodoc_app', 'translations'),
        '*',  # language code
        'LC_MESSAGES',
        '{0}.po'.format(domain),
    )


i18n_js = GlobBundle(
    catalog('messages'),
    filters=AngularGettextFilter(catalog_name='rerodocTranslations'),
    output='gen/translations/rerodoc-search.js',
)

npm_js = NpmBundle('js/rerodoc.search.js',
                   filters='requirejs',
                   output="gen/bibliomedia.npm_js.%(version)s.js",
                   npm={
                       'almond': '~0.3.1',
                       'angular': '~1.4.8',
                       'angular-loading-bar': '~0.9.0',
                       'd3': '^3.5.17',
                       'invenio-search-js': '~0.2.0',
                       'angular-sanitize': '~1.4.10',
                       'angular-gettext': '^2.3.8'
                   })
Example #6
0
from pkg_resources import resource_filename


def catalog(domain):
    """Return glob matching path to tranlated messages for a given domain."""
    return os.path.join(
        os.path.abspath(resource_filename('rero_ils', 'translations')),
        '*',  # language code
        'LC_MESSAGES',
        '{0}.po'.format(domain),
    )


i18n = GlobBundle(
    catalog('messages'),
    filters=AngularGettextFilter(catalog_name='reroilsAppTranslations'),
    # output='gen/translations/rero_ils.js',
)

js = NpmBundle(
    'js/rero_ils/documents_items.js',
    'js/rero_ils/app.js',
    filters='requirejs',
    depends=('node_modules/invenio-search-js/dist/*.js', 'node_modules/d3/*'),
    # output='gen/rero_ils.search.%(version)s.js',
    npm={
        "almond": "~0.3.1",
        'angular': '~1.4.10',
        'angular-loading-bar': '~0.9.0',
        'd3': '^3.5.17',
        'invenio-search-js': '^1.3.1',