Added Gulp.js for compiling SCSS stylesheets
This commit is contained in:
21
node_modules/remove-bom-stream/LICENSE
generated
vendored
Normal file
21
node_modules/remove-bom-stream/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
|
||||
|
||||
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.
|
51
node_modules/remove-bom-stream/README.md
generated
vendored
Normal file
51
node_modules/remove-bom-stream/README.md
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
<p align="center">
|
||||
<a href="http://gulpjs.com">
|
||||
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# remove-bom-stream
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
|
||||
|
||||
Remove a UTF8 BOM at the start of the stream.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var fs = require('fs');
|
||||
var concat = require('concat-stream');
|
||||
var removeBOM = require('remove-bom-stream');
|
||||
|
||||
fs.createReadStream('utf8-file-with-bom.txt')
|
||||
.pipe(removeBOM())
|
||||
.pipe(concat(function(result) {
|
||||
// result won't have a BOM
|
||||
}));
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `removeBOM()`
|
||||
|
||||
Returns a `through2` stream that will remove a BOM, given the data is a UTF8 Buffer with a BOM at the beginning. If the data is not UTF8 or does not have a BOM, the data is not changed and this becomes a normal passthrough stream.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[downloads-image]: http://img.shields.io/npm/dm/remove-bom-stream.svg
|
||||
[npm-url]: https://npmjs.com/package/remove-bom-stream
|
||||
[npm-image]: http://img.shields.io/npm/v/remove-bom-stream.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/remove-bom-stream
|
||||
[travis-image]: http://img.shields.io/travis/gulpjs/remove-bom-stream.svg?label=travis-ci
|
||||
|
||||
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/remove-bom-stream
|
||||
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/remove-bom-stream.svg?label=appveyor
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/remove-bom-stream
|
||||
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/remove-bom-stream/master.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
|
51
node_modules/remove-bom-stream/index.js
generated
vendored
Normal file
51
node_modules/remove-bom-stream/index.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
'use strict';
|
||||
|
||||
var through = require('through2');
|
||||
var removeBom = require('remove-bom-buffer');
|
||||
var SafeBuffer = require('safe-buffer').Buffer;
|
||||
|
||||
function removeBomStream() {
|
||||
var completed = false;
|
||||
var buffer = SafeBuffer.alloc(0);
|
||||
|
||||
return through(onChunk, onFlush);
|
||||
|
||||
function removeAndCleanup(data) {
|
||||
completed = true;
|
||||
|
||||
buffer = null;
|
||||
|
||||
return removeBom(data);
|
||||
}
|
||||
|
||||
function onChunk(data, enc, cb) {
|
||||
if (completed) {
|
||||
return cb(null, data);
|
||||
}
|
||||
|
||||
if (data.length >= 7) {
|
||||
return cb(null, removeAndCleanup(data));
|
||||
}
|
||||
|
||||
var bufferLength = buffer.length;
|
||||
var chunkLength = data.length;
|
||||
var totalLength = bufferLength + chunkLength;
|
||||
|
||||
buffer = SafeBuffer.concat([buffer, data], totalLength);
|
||||
|
||||
if (totalLength >= 7) {
|
||||
return cb(null, removeAndCleanup(buffer));
|
||||
}
|
||||
cb();
|
||||
}
|
||||
|
||||
function onFlush(cb) {
|
||||
if (completed || !buffer) {
|
||||
return cb();
|
||||
}
|
||||
|
||||
cb(null, removeAndCleanup(buffer));
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = removeBomStream;
|
51
node_modules/remove-bom-stream/package.json
generated
vendored
Normal file
51
node_modules/remove-bom-stream/package.json
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "remove-bom-stream",
|
||||
"version": "1.2.0",
|
||||
"description": "Remove a UTF8 BOM at the start of the stream.",
|
||||
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
|
||||
"contributors": [
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com>"
|
||||
],
|
||||
"repository": "gulpjs/remove-bom-stream",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint index.js test/ && jscs index.js test/",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --async-only",
|
||||
"cover": "istanbul cover _mocha",
|
||||
"coveralls": "npm run cover && istanbul-coveralls"
|
||||
},
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.1.0",
|
||||
"remove-bom-buffer": "^3.0.0",
|
||||
"through2": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"buffer-equal": "^1.0.0",
|
||||
"eslint": "^1.10.3",
|
||||
"eslint-config-gulp": "^2.0.0",
|
||||
"expect": "^1.20.2",
|
||||
"istanbul": "^0.4.3",
|
||||
"istanbul-coveralls": "^1.0.3",
|
||||
"jscs": "^2.4.0",
|
||||
"jscs-preset-gulp": "^1.0.0",
|
||||
"mississippi": "^1.3.0",
|
||||
"mocha": "^3.2.0",
|
||||
"stream-chunker": "^1.2.8"
|
||||
},
|
||||
"keywords": [
|
||||
"bom",
|
||||
"remove",
|
||||
"utf8",
|
||||
"streaming",
|
||||
"stream"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user