2.9.0 • Published 8 years ago

tpack-coffee-script v2.9.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

tpack-coffee-script

TPack 插件:使用 coffeescript 编译 CoffeeScript。

安装

$ npm install tpack-coffee-script -g

使用

编译 CoffeeScript 并重命名为 JS

tpack.src("*.coffee").pipe(tpack.plugin("tpack-coffee-script"));

源映射(Source Map)

本插件可生成源映射,具体用法见 源映射

配置

tpack.src("*.coffee").pipe(tpack.plugin("tpack-coffee-script"), {
	bare: false,
	header: false,
	literate: false,
	filename: "",
	sourceMap: "",
	sourceRoot: false,
	generatedFile: "",
	sourceFiles: [""]
    // 配置...
});

另参考 https://github.com/jashkenas/coffeescript/