Changeset 10907
- Timestamp:
- 04/14/2021 07:13:50 PM (4 years ago)
- 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 65 65 }, 66 66 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 67 129 watch: { 68 130 css: { … … 78 140 79 141 grunt.loadNpmTasks( 'grunt-sass' ); 142 grunt.loadNpmTasks( 'grunt-rtlcss' ); 80 143 grunt.loadNpmTasks( 'grunt-postcss' ); 81 144 grunt.loadNpmTasks( 'grunt-sass-globbing' ); 82 145 grunt.loadNpmTasks( 'grunt-contrib-watch' ); 83 146 84 grunt.registerTask( 'css', [ 'sass_globbing', 'sass', 'postcss' ] );147 grunt.registerTask( 'css', [ 'sass_globbing', 'sass', 'postcss', 'rtlcss:dynamic' ] ); 85 148 86 149 grunt.registerTask( 'default', [ 'css' ] ); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/package.json
r10169 r10907 29 29 "grunt-contrib-watch": "1.1.0", 30 30 "grunt-postcss": "0.9.0", 31 "grunt-rtlcss": "2.0.1", 31 32 "grunt-sass": "3.1.0", 32 33 "grunt-sass-globbing": "1.5.1",
Note: See TracChangeset
for help on using the changeset viewer.