remax-wsl2-sync

1.0.3 • Public • Published

@remax/plugin-wx-shake

用于同步 WSL2 产出物到 windows 文件系统中,便于开发预览

安装

$ npm install @remax/wsl2-sync --save
或者
$ yarn add @remax/wsl2-sync -D

使用

// remax.config.js
const Wsl2Sync = require('@remax/wsl2-sync');

module.exports = {
    plugins: [Wsl2Sync("/mnt/d/code/remax-demo")],
};

配置

支持传入string | object,string 时,默认从 dist 目录拷贝到指定目录

// remax.config.js
const Wsl2Sync = require('@remax/wsl2-sync');

module.exports = {
    plugins: [Wsl2Sync("/mnt/d/code/remax-demo")],
};

类型为 object 时格式为 { from, to }, 路径请参考 cpx

// remax.config.js
const path = require("path");
const Wsl2Sync = require('@remax/wsl2-sync');

module.exports = {
    plugins: [Wsl2Sync({
        from: path.resolve(__dirname, "dist") + "/**/*.{js,wxss,json}",
        to: "/mnt/d/code/todo-demo"
    })],
};

LICENSE

MIT

/remax-wsl2-sync/

    Package Sidebar

    Install

    npm i remax-wsl2-sync

    Weekly Downloads

    2

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    3.12 kB

    Total Files

    4

    Last publish

    Collaborators

    • soocto