小编Mar*_*tzl的帖子

在单个分隔符出现时拆分

我有类似的字符串

A_B_C_D
A_B___C_D
Run Code Online (Sandbox Code Playgroud)

其中,___可在字符串中的任何地方.

将它们分成任何一个_但不是最简单的方法是什么___

javascript

7
推荐指数
1
解决办法
75
查看次数

来自Windows客户端的grunt-rsync失败

我想使用Grunt和rsync将一些代码从我的计算机(Windows)部署到服务器(Linux).

我的Gruntfile.js

module.exports = function(grunt) {

    grunt.initConfig({

        rsync: {
            options: {
                args: ['--verbose', '--chmod=777'],
                exclude: ['*.git', 'node_modules'],
                recursive: true
            },
            production: {
                options: {
                    src: './bitzl.com',
                    dest: '/home/marcus/bitzl.com',
                    host: 'marcus@bitzl.com',
                    syncDest: true
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-rsync');
}
Run Code Online (Sandbox Code Playgroud)

请注意,我用的home目录marcuschmod=777只是为了简化测试.

运行grunt rsync失败:

Running "rsync:production" (rsync) task
rsyncing ./example.com >>> /home/marcus/bitzl.com
Shell command was: rsync ./bitzl.com marcus@bitzl.com:/home/marcus/bitzl.com --rsh ssh --recursive --delete --delete-exc
luded --exclude=*.git --exclude=node_modules --verbose --chmod=777
ERROR
Error: rsync exited with code 12 …
Run Code Online (Sandbox Code Playgroud)

windows rsync gruntjs

6
推荐指数
1
解决办法
972
查看次数

标签 统计

gruntjs ×1

javascript ×1

rsync ×1

windows ×1