1 Star 0 Fork 1

EricYao/yaml.js

forked from Gitee 极速下载/yaml.js 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
Jérémy Faivre 提交于 2014-09-02 10:07 . Fix minified file.
#!/bin/sh
cd `dirname $0`
# Generate yaml.js
file="bin/yaml.js"
> $file
echo Compiling $file ...
echo " - LICENSE"
echo "/*" >> $file
cat LICENSE >> $file
echo "\n*/" >> $file
echo "(function(){" >> $file
echo " - YamlParseException.js"
cat src/yaml/YamlParseException.js >> $file
echo " - Yaml.js"
cat src/yaml/Yaml.js >> $file
echo " - YamlInline.js"
cat src/yaml/YamlInline.js >> $file
echo " - YamlParser.js"
cat src/yaml/YamlParser.js >> $file
echo " - YamlEscaper.js"
cat src/yaml/YamlEscaper.js >> $file
echo " - YamlUnescaper.js"
cat src/yaml/YamlUnescaper.js >> $file
echo " - YamlDumper.js"
cat src/yaml/YamlDumper.js >> $file
echo "})();" >> $file
# Generate yaml.min.js
file="bin/yaml.min.js"
echo "compressing..."
echo "/*" > $file
cat LICENSE >> $file
echo "\n*/" >> $file
uglifyjs bin/yaml.js -nc >> $file
echo "yaml.js compiled."
echo "yaml.min.js compiled."
# Generate yaml2json
echo "#!/usr/bin/env node" > bin/yaml2json
cat src/cli/yaml2json.js >> bin/yaml2json
chmod +x bin/yaml2json
echo "yaml2json compiled."
# Generate json2yaml
echo "#!/usr/bin/env node" > bin/json2yaml
cat src/cli/json2yaml.js >> bin/json2yaml
chmod +x bin/json2yaml
echo "json2yaml compiled."
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/yaoxiujun/yaml.js.git
git@gitee.com:yaoxiujun/yaml.js.git
yaoxiujun
yaml.js
yaml.js
master

搜索帮助