0.1.4 • Published 10 years ago

grunt-cms-file-writer-syncer v0.1.4

Weekly downloads
20
License
-
Repository
-
Last release
10 years ago

grunt-cms-file-writer-syncer

使用grunt将文件直接推送至CMS-FILE-WRITER,从而通过命令行即可完成上线

使用说明

添加依赖

npm install grunt-cms-file-writer-syncer --save-dev

或者在package.json添加devDependencies添加依赖:

"devDependencies": {
    "grunt-cms-file-writer-syncer" : "latest",
}

在你的Gruntfile中添加引用

grunt.loadNpmTasks('grunt-cms-file-writer-syncer');

The "cms-file-writer-syncer" task

Overview

在你的项目中,在Gruntfile中添加配置 cms-file-writer-syncer.

grunt.initConfig({
  "cms-file-writer-syncer": {
    options: {
        remote : ""//远程文件夹路径
    },
    files: [{
      expand: true,
      filter: 'isFile',
      cwd: "dist",
      src: ['**/*.html' , '**/*.js' , '**/*.css' , '**/*.xml' , '**/*.json']
    }]
  },
});

参数说明

options.remote

类型: String

远程文件夹路径,注意与其他文件造成冲突,请小心定义,如果仅仅是测试用途,请填写/test

文件访问说明

外部访问

http://c.youdao.com/{options.remote}/{filepath}(TTL:10分钟)
http://c.ydstatic.com/{options.remote}/{filepath}(TTL:1天)

机群内部访问

http://sb126x.corp.youdao.com:10050/{options.remote}/{filepath}

其他

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago