Making WordPress.org

Changeset 10907


Ignore:
Timestamp:
04/14/2021 07:13:50 PM (4 years ago)
Author:
coreymckrill
Message:

WordPress.org Learn: Sync with GitHub

https://github.com/WordPress/learn/commit/5946a99cc6344c19aa80cb01cef9979971181fb4

Props dd32

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/Gruntfile.js

    r10131 r10907  
    6565        },
    6666
     67        rtlcss: {
     68            options: {
     69                // rtlcss options.
     70                opts: {
     71                    clean: false,
     72                    processUrls: { atrule: true, decl: false },
     73                    stringMap: [
     74                        {
     75                            name: 'import-rtl-stylesheet',
     76                            priority: 10,
     77                            exclusive: true,
     78                            search: [ '.css' ],
     79                            replace: [ '-rtl.css' ],
     80                            options: {
     81                                scope: 'url',
     82                                ignoreCase: false
     83                            }
     84                        } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
     85                    ]
     86                },
     87                saveUnmodified: false,
     88                plugins: [
     89                    {
     90                        name: 'swap-dashicons-left-right-arrows',
     91                        priority: 10,
     92                        directives: {
     93                            control: {},
     94                            value: []
     95                        },
     96                        processors: [
     97                            {
     98                                expr: /content/im,
     99                                action: function( prop, value ) {
     100                                    if ( value === '"\\f141"' ) { // dashicons-arrow-left.
     101                                        value = '"\\f139"';
     102                                    } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt.
     103                                        value = '"\\f344"';
     104                                    } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2.
     105                                        value = '"\\f345"';
     106                                    } else if ( value === '"\\f139"' ) { // dashicons-arrow-right.
     107                                        value = '"\\f141"';
     108                                    } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt.
     109                                        value = '"\\f340"';
     110                                    } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2.
     111                                        value = '"\\f341"';
     112                                    }
     113                                    return { prop: prop, value: value };
     114                                }
     115                            } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
     116                        ]
     117                    } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
     118                ]
     119            },
     120            dynamic: {
     121                expand: true,
     122                cwd: 'css/',
     123                dest: 'css/',
     124                ext: '-rtl.css',
     125                src: ['**/style.css']
     126            }
     127        },
     128
    67129        watch: {
    68130            css: {
     
    78140
    79141    grunt.loadNpmTasks( 'grunt-sass' );
     142    grunt.loadNpmTasks( 'grunt-rtlcss' );
    80143    grunt.loadNpmTasks( 'grunt-postcss' );
    81144    grunt.loadNpmTasks( 'grunt-sass-globbing' );
    82145    grunt.loadNpmTasks( 'grunt-contrib-watch' );
    83146
    84     grunt.registerTask( 'css', [ 'sass_globbing', 'sass', 'postcss' ] );
     147    grunt.registerTask( 'css', [ 'sass_globbing', 'sass', 'postcss', 'rtlcss:dynamic' ] );
    85148
    86149    grunt.registerTask( 'default', [ 'css' ] );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/package.json

    r10169 r10907  
    2929        "grunt-contrib-watch": "1.1.0",
    3030        "grunt-postcss": "0.9.0",
     31        "grunt-rtlcss": "2.0.1",
    3132        "grunt-sass": "3.1.0",
    3233        "grunt-sass-globbing": "1.5.1",
Note: See TracChangeset for help on using the changeset viewer.