Exemplo n.º 1
0
    def webassets_bundles(self):

        jsminifier = 'rjsmin'

        confirm = Bundle(
            'js/confirm.jsx',
            filters='jsx',
            output='bundles/confirm.bundle.js'
        )

        dropzone = Bundle(
            'js/dropzone.js',
            filters=jsminifier,
            output='bundles/dropzone.bundle.js'
        )

        typeahead = Bundle(
            'js/typeahead.jsx',
            filters='jsx',
            output='bundles/typeahead.bundle.js'
        )

        # do NOT minify the redactor, or the copyright notice goes away, which
        # is something we are not allowed to do per our license
        # ->
        redactor = Bundle(
            'js/redactor.min.js',
            output='bundles/redactor.bundle.js'
        )
        redactor_theme = Bundle(
            'css/redactor.css',
            output='bundles/redactor.bundle.css'
        )
        # <-

        editor = Bundle(
            'js/bufferbuttons.js',
            'js/definedlinks.js',
            'js/filemanager.js',
            'js/imagemanager.js',
            'js/redactor.de.js',
            'js/input_with_button.js',
            'js/editor.js',
            filters=jsminifier,
            output='bundles/editor.bundle.js'
        )

        code_editor = Bundle(
            'js/ace.js',
            'js/ace-mode-form.js',
            'js/ace-theme-tomorrow.js',
            'js/code_editor.js',
            filters=jsminifier,
            output='bundles/code_editor.bundle.js'
        )

        common = Bundle(
            'js/modernizr.js',
            'js/jquery.js',
            'js/fastclick.js',
            'js/foundation.js',
            'js/intercooler.js',
            'js/underscore.js',
            'js/react.js',
            asset('js/form_dependencies.js'),
            confirm,
            typeahead,
            'js/jquery.datetimepicker.js',
            'js/datetimepicker.js',
            'js/jquery.popupoverlay.js',
            'js/common.js',
            filters=jsminifier,
            output='bundles/common.bundle.js'
        )

        common_css = Bundle(
            'css/jquery.datetimepicker.css',
            filters='cssmin',
            output='bundles/common.bundle.css',
        )

        fullcalendar = Bundle(
            'js/moment.js',
            'js/moment.de.js',
            'js/fullcalendar.js',
            'js/fullcalendar.de.js',
            'js/fullcalendar_custom.js',
            filters=jsminifier,
            output='bundles/fullcalendar.bundle.js'
        )

        fullcalendar_css = Bundle(
            'css/fullcalendar.css',
            filters='cssmin',
            output='bundles/fullcalendar.bundle.css'
        )

        check_password = Bundle(
            'js/zxcvbn.js',
            'js/check_password.js',
            filters=jsminifier,
            output='bundles/check_password.bundle.js'
        )

        check_contrast = Bundle(
            'js/check_contrast.js',
            filters=jsminifier,
            output='bundles/check_contrast.bundle.js'
        )

        events = Bundle(
            'js/url.js',
            'js/events.js',
            filters=jsminifier,
            output='bundles/events.bundle.js'
        )

        sortable = Bundle(
            'js/sortable.js',
            'js/sortable_custom.js',
            filters=jsminifier,
            output='bundles/sortable.bundle.js'
        )

        return {
            'common': common,
            'common_css': common_css,
            'dropzone': dropzone,
            'redactor': redactor,
            'redactor_theme': redactor_theme,
            'editor': editor,
            'code_editor': code_editor,
            'check_password': check_password,
            'check_contrast': check_contrast,
            'fullcalendar': fullcalendar,
            'fullcalendar_css': fullcalendar_css,
            'events': events,
            'sortable': sortable
        }
Exemplo n.º 2
0
def test_assets():
    assert os.path.exists(asset('js/form_dependencies.js'))