structure, layout and automation

This commit is contained in:
Tancre
2020-09-16 14:23:28 +02:00
commit 0efda7fffe
15549 changed files with 1280031 additions and 0 deletions

4
node_modules/vinyl-sourcemaps-apply/.jshintrc generated vendored Normal file
View File

@ -0,0 +1,4 @@
{
"node": true,
"strict": true
}

2
node_modules/vinyl-sourcemaps-apply/.npmignore generated vendored Normal file
View File

@ -0,0 +1,2 @@
.DS_Store
node_modules

42
node_modules/vinyl-sourcemaps-apply/README.md generated vendored Normal file
View File

@ -0,0 +1,42 @@
# vinyl-sourcemaps-apply
Apply a source map to a vinyl file, merging it with preexisting source maps.
## Usage:
```javascript
var applySourceMap = require('vinyl-sourcemaps-apply');
applySourceMap(vinylFile, sourceMap);
```
### Example (Gulp plugin):
```javascript
var through = require('through2');
var applySourceMap = require('vinyl-sourcemaps-apply');
var myTransform = require('myTransform');
module.exports = function(options) {
function transform(file, encoding, callback) {
// generate source maps if plugin source-map present
if (file.sourceMap) {
options.makeSourceMaps = true;
}
// do normal plugin logic
var result = myTransform(file.contents, options);
file.contents = new Buffer(result.code);
// apply source map to the chain
if (file.sourceMap) {
applySourceMap(file, result.map);
}
this.push(file);
callback();
}
return through.obj(transform);
};
```

39
node_modules/vinyl-sourcemaps-apply/index.js generated vendored Normal file
View File

@ -0,0 +1,39 @@
'use strict';
var SourceMapGenerator = require('source-map').SourceMapGenerator;
var SourceMapConsumer = require('source-map').SourceMapConsumer;
module.exports = function applySourceMap(file, sourceMap) {
if (typeof sourceMap === 'string' || sourceMap instanceof String) {
sourceMap = JSON.parse(sourceMap);
}
if (file.sourceMap && (typeof file.sourceMap === 'string' || file.sourceMap instanceof String)) {
file.sourceMap = JSON.parse(file.sourceMap);
}
// check source map properties
assertProperty(sourceMap, "file");
assertProperty(sourceMap, "mappings");
assertProperty(sourceMap, "sources");
// fix paths if Windows style paths
sourceMap.file = sourceMap.file.replace(/\\/g, '/');
sourceMap.sources = sourceMap.sources.map(function(filePath) {
return filePath.replace(/\\/g, '/');
});
if (file.sourceMap && file.sourceMap.mappings !== '') {
var generator = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(sourceMap));
generator.applySourceMap(new SourceMapConsumer(file.sourceMap));
file.sourceMap = JSON.parse(generator.toString());
} else {
file.sourceMap = sourceMap;
}
};
function assertProperty(sourceMap, propertyName) {
if (!sourceMap.hasOwnProperty(propertyName)) {
var e = new Error('Source map to be applied is missing the \"' + propertyName + '\" property');
throw e;
}
}

57
node_modules/vinyl-sourcemaps-apply/package.json generated vendored Normal file
View File

@ -0,0 +1,57 @@
{
"_from": "vinyl-sourcemaps-apply@^0.2.1",
"_id": "vinyl-sourcemaps-apply@0.2.1",
"_inBundle": false,
"_integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=",
"_location": "/vinyl-sourcemaps-apply",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "vinyl-sourcemaps-apply@^0.2.1",
"name": "vinyl-sourcemaps-apply",
"escapedName": "vinyl-sourcemaps-apply",
"rawSpec": "^0.2.1",
"saveSpec": null,
"fetchSpec": "^0.2.1"
},
"_requiredBy": [
"/gulp-postcss",
"/gulp-sass"
],
"_resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz",
"_shasum": "ab6549d61d172c2b1b87be5c508d239c8ef87705",
"_spec": "vinyl-sourcemaps-apply@^0.2.1",
"_where": "/home/outis/Documents/Sites/BBB/node_modules/gulp-postcss",
"author": {
"name": "Florian Reiterer",
"email": "me@florianreiterer.com"
},
"bugs": {
"url": "https://github.com/floridoo/vinyl-sourcemaps-apply/issues"
},
"bundleDependencies": false,
"dependencies": {
"source-map": "^0.5.1"
},
"deprecated": false,
"description": "Apply a source map to a vinyl file, merging it with preexisting source maps",
"homepage": "http://github.com/floridoo/vinyl-sourcemaps-apply",
"keywords": [
"vinyl",
"sourcemaps",
"source maps",
"gulp"
],
"license": "ISC",
"main": "index.js",
"name": "vinyl-sourcemaps-apply",
"repository": {
"type": "git",
"url": "git://github.com/floridoo/vinyl-sourcemaps-apply.git"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "0.2.1"
}