tapc-plugin-assets
v0.2.8
Published
启动CDN文件映射的plugin
Downloads
23
Readme
tapc-plugin-assets
tapc assets插件,资源代理
Install
$ npm install -g tapc
Usage
-p
或--port
指定HTTP服务器端口
# 指定HTTP端口为8888
$ tapc assets -p 8888
$ tapc assets --port 8888
-s
或--sslPort
指定HTTPS服务器端口
# 指定HTTPS端口为8888
$ tapc assets -s 8888
$ tapc assets --sslPort 8888
-r
或--root
指定代理服务器根目录,默认值为~/.tap/LocalCDNPath/
# 指定代理根目录为~/.tap
$ tapc assets -r ~/.tap
$ tapc assets --root ~/.tap
-u
或--useSrc
指定优先从src目录代理
# 指定资源优先从src代理
$ tapc assets -u
$ tapc assets --useSrc
Test
$ npm run build # build the source code with babel
$ npm run dev # build automatically when files change
$ npm run test # run unit tests
License
The MIT License (MIT)
Copyright (c) 2015 tmallfe
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.