tolk

所属分类:Python编程
开发工具:HTML
文件大小:0KB
下载次数:0
上传日期:2020-04-05 09:42:04
上 传 者sh-1993
说明:  一种文件读取器,它承诺在给定可用的转发器的情况下将非web资产转换为web资产。自动前缀,...
(A file reader that promises to translate non-web assets to web assets given the available transpilers. Autoprefixing, sourcemaps and all!)

文件列表:
.editorconfig (301, 2018-12-11)
.eslintignore (37, 2018-12-11)
.eslintrc.js (183, 2018-12-11)
.jsdoc.json (177, 2018-12-11)
.prettierignore (13, 2018-12-11)
.prettierrc (26, 2018-12-11)
.travis.yml (520, 2018-12-11)
fixtures/ (0, 2018-12-11)
fixtures/compiled/ (0, 2018-12-11)
fixtures/compiled/autoprefixer/ (0, 2018-12-11)
fixtures/compiled/autoprefixer/unprefixed.css (296, 2018-12-11)
fixtures/compiled/autoprefixer/unprefixed.less (296, 2018-12-11)
fixtures/compiled/autoprefixer/unprefixed.myth (296, 2018-12-11)
fixtures/compiled/autoprefixer/unprefixed.scss (296, 2018-12-11)
fixtures/compiled/autoprefixer/unprefixed.styl (296, 2018-12-11)
fixtures/compiled/babel/ (0, 2018-12-11)
fixtures/compiled/babel/basic.js (1216, 2018-12-11)
fixtures/compiled/babel/string.js (34, 2018-12-11)
fixtures/compiled/coco/ (0, 2018-12-11)
fixtures/compiled/coco/basic.js (443, 2018-12-11)
fixtures/compiled/coco/string.js (47, 2018-12-11)
fixtures/compiled/coffee/ (0, 2018-12-11)
fixtures/compiled/coffee/basic.js (53, 2018-12-11)
fixtures/compiled/coffee/string.js (21, 2018-12-11)
fixtures/compiled/csso/ (0, 2018-12-11)
fixtures/compiled/csso/basic.css (71, 2018-12-11)
fixtures/compiled/csso/opts.css (38, 2018-12-11)
fixtures/compiled/csso/string.css (28, 2018-12-11)
fixtures/compiled/dogescript/ (0, 2018-12-11)
fixtures/compiled/dogescript/basic.js (88, 2018-12-11)
fixtures/compiled/dogescript/string.js (20, 2018-12-11)
fixtures/compiled/ejs/ (0, 2018-12-11)
fixtures/compiled/ejs/basic.html (35, 2018-12-11)
fixtures/compiled/ejs/client-complex.html (47, 2018-12-11)
fixtures/compiled/ejs/client.html (1253, 2018-12-11)
fixtures/compiled/ejs/cstring.html (1219, 2018-12-11)
fixtures/compiled/ejs/partial.html (76, 2018-12-11)
fixtures/compiled/ejs/precompile.html (43, 2018-12-11)
... ...

# Tolk [![NPM version](https://badge.fury.io/js/tolk.svg)](http://badge.fury.io/js/tolk) [![Build Status](https://travis-ci.org/Munter/tolk.svg?branch=master)](https://travis-ci.org/Munter/tolk) [![Coverage Status](https://img.shields.io/coveralls/Munter/tolk.svg)](https://coveralls.io/r/Munter/tolk?branch=master) [![Dependency Status](https://david-dm.org/Munter/tolk.svg)](https://david-dm.org/Munter/tolk) Tolk is a "do the right thing" tool for transpiling. It reads a file from the file system, transpiles it with the available transpilers, inlines sourcemaps and autoprefixes css. Returns a promise that resolves with the resulting transpiler output. Installing the individual transpilers tolk should use is up to the consumer. There are no transpiler dependencies out of the box. So if you only need babel and sass, install `babel` and `node-sass`. Tolk is useful for tools that handle precompiling for you, but might also be used directly in your task runner of preference in order to skip some of the many plugins that do the same but worse. **Current precompiler support:** `LiveScript`, `babel`, `coco`, `coffee-script`, `dogescript`, `less`, `marked`, `myth`, `node-sass`, `stylus`, `swig` ## Usage ``` npm install tolk ``` Out of the box this will only give you CSS autoprefixing. In order to do more, for example babel and sass, also do this: ``` npm install node-sass babel ``` Now you are ready to start reading files from the file system. Tolk automatically loads the transpilers it has access to in the scope it is run in. ```js var tolk = require('tolk'); // CSS is compiled, sourcemapped and autoprefixed CSS const CSS = await tolk.read('path/to/stylesheet.scss'); // JS is compiled ES6 with source maps const JS = await tolk.read('path/to/Reactcomponent.jsx'); ``` ## License (The MIT License) Copyright (c) 2015 Peter Müller 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.

近期下载者

相关文件


收藏者