locales(cb) {
        const fs = require('fs')
        const path = require('path')
        const isPrimitive = obj => obj === null || [ 'string', 'number', 'boolean' ].includes( typeof obj )
        const isArrayOfPrimitive = obj => Array.isArray( obj ) && obj.every( isPrimitive )
        const format = arr =>
            `^^^[ ${
                arr.map( val => JSON.stringify( val ) ).join( ', ' )
            } ]`
        const replacer = ( key, value ) => isArrayOfPrimitive( value ) ? format( value ) : value
        const expand = str => str.replace(
            /(?:"\^\^\^)(\[ .* \])(?:\")/g, ( match, a ) =>
                a.replace( /\\"/g, '"' )
        )
        const stringify = (obj, space=4) => expand( JSON.stringify( obj, replacer, space ) )

        return gulp.src(['src/w2locale.js'])
            .pipe(replace(/^export {/gm, 'module.exports = {'))
            .pipe(concat('w2locale.cjs'))
            .pipe(gulp.dest('src/'))
            .on('end', () => {
                process_locales()
                del('./src/w2locale.cjs')
                cb()
            })

        function process_obj(m, o) {
            Object.keys(o).forEach(k => {
                if (typeof m[k] === 'undefined') delete o[k]
            })
            for (const [k, v] of Object.entries(m)) {
                if (typeof o[k] === 'undefined') o[k] = v
                if (typeof v === 'object' && Object.keys(o[k]).length) o[k] = process_obj(v, o[k])
            }
            return Object.assign(m, o)
        }

        function process_locales() {
            const master = require('./src/w2locale.cjs').w2locale
            const dir_locales = './src/locale'
            fs.readdir(dir_locales, (err, files) => {
                files.forEach(file => {
                    let m = JSON.parse(JSON.stringify(master))
                    let filepath = path.join(dir_locales, file)
                    let o = JSON.parse( fs.readFileSync(filepath) )
                    fs.writeFileSync(filepath, stringify(process_obj(m, o)) + '\n')
                })
            })
        }
    }
/*.js'], tasks.pack) // only packs dist/w2ui.js
        gulp.watch(['src/less/*