diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/gulp-json-transform | |
parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) |
remove node_modules
Diffstat (limited to 'node_modules/gulp-json-transform')
-rw-r--r-- | node_modules/gulp-json-transform/.travis.yml | 3 | ||||
-rw-r--r-- | node_modules/gulp-json-transform/LICENSE | 22 | ||||
-rw-r--r-- | node_modules/gulp-json-transform/README.md | 68 | ||||
-rw-r--r-- | node_modules/gulp-json-transform/index.js | 59 | ||||
-rw-r--r-- | node_modules/gulp-json-transform/out.txt | 129 | ||||
-rw-r--r-- | node_modules/gulp-json-transform/package.json | 35 |
6 files changed, 0 insertions, 316 deletions
diff --git a/node_modules/gulp-json-transform/.travis.yml b/node_modules/gulp-json-transform/.travis.yml deleted file mode 100644 index 0b42bb11b..000000000 --- a/node_modules/gulp-json-transform/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "4.8.4" diff --git a/node_modules/gulp-json-transform/LICENSE b/node_modules/gulp-json-transform/LICENSE deleted file mode 100644 index 9c6ee41d9..000000000 --- a/node_modules/gulp-json-transform/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Tom Haggie - -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. - diff --git a/node_modules/gulp-json-transform/README.md b/node_modules/gulp-json-transform/README.md deleted file mode 100644 index fa71df3da..000000000 --- a/node_modules/gulp-json-transform/README.md +++ /dev/null @@ -1,68 +0,0 @@ -gulp-json-transform -=================== -[](https://www.npmjs.com/package/gulp-json-transform) -[](https://travis-ci.org/thaggie/gulp-json-transform) -[](https://david-dm.org/thaggie/gulp-json-transform) - - -A [gulp](https://github.com/gulpjs/gulp) plugin to transform JSON files, pipe JSON files through it and transform them to other JSON files or other text based formats. - - -## Usage - - -First install `gulp-json-transform` as a development dependency: - -```shell -npm install gulp-json-transform --save-dev -``` - -Then, add it to your gulpfile.js: - -```javascript -var jsonTransform = require('gulp-json-transform'); -``` - -Then create a task that uses it: - -```javascript -gulp.task('do-something', function() { - gulp.src('./app/**/*.json') - .pipe(jsonTransform(function(data, file) { - return { - foobar: data.foo + file.relative - }; - })) - .pipe(gulp.dest('./dist/out/')); -}); -``` - -## API - -### jsonTransform(transformFn [, whiteSpace]) - -#### transformFn -Type: `function` - -A function that takes the JSON object and a file object (parameters path, base and relative are exposed) as the input parameters and should return either a string which is written raw to the file, a JSON object which is stringified or a Promise which resolves to a string or a JSON object. - -Example structure of the file object: -``` -{ - path: 'test/fixtures/input.json', - relative: 'input.json', - base: 'test/fixtures' -} -``` - -#### whiteSpace - -Type: `String` or `Number` -Default: `undefined` - -JSON.stringify's whitespace attribute for pretty-printing the resulting JSON. -See [MDN docs on JSON.stringify()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) for more information. - -## License - -[MIT License](http://en.wikipedia.org/wiki/MIT_License) diff --git a/node_modules/gulp-json-transform/index.js b/node_modules/gulp-json-transform/index.js deleted file mode 100644 index a42f4239c..000000000 --- a/node_modules/gulp-json-transform/index.js +++ /dev/null @@ -1,59 +0,0 @@ -var Promise = require('promise'); -var through = require('through2'); -var gutil = require('gulp-util'); -var PluginError = gutil.PluginError; - -const PLUGIN_NAME = 'gulp-json-transform'; - -function jsonPromiseParse(rawStr) { - return new Promise(function(resolve, reject) { - var json; - try { - json = JSON.parse(rawStr); - } catch (e) { - return reject(new Error('Invalid JSON: ' + e.message)); - } - resolve(json); - }); -} - -module.exports = function(transformFn, jsonSpace) { - if (!transformFn) { - throw new PluginError(PLUGIN_NAME, 'Missing transform function!'); - } - - return through.obj(function(file, enc, cb) { - var self = this; - - if (file.isStream()) { - return self.emit('error', new PluginError(PLUGIN_NAME, 'Streaming not supported')); - } - - if (file.isBuffer()) { - var fileContent = file.contents.toString(enc); - - jsonPromiseParse(fileContent) - .then(function(data){ - return transformFn(data, { - path: file.path, - relative: file.relative, - base: file.base - }); - }) - .then(function(output) { - var isString = (typeof output === 'string'); - file.contents = new Buffer(isString ? output : JSON.stringify(output, null, jsonSpace)); - self.push(file); - cb(); - }) - .catch(function(e) { - gutil.log(PLUGIN_NAME + ':', gutil.colors.red(e.message)); - self.emit('error', new PluginError(PLUGIN_NAME, e)); - self.emit('end'); - }); - - } - - }); - -}; diff --git a/node_modules/gulp-json-transform/out.txt b/node_modules/gulp-json-transform/out.txt deleted file mode 100644 index 1abdc0dd5..000000000 --- a/node_modules/gulp-json-transform/out.txt +++ /dev/null @@ -1,129 +0,0 @@ -gulp-json-transform@0.4.4 /Users/tom/dev/gulp-json-transform -├─┬ gulp-util@3.0.8 -│ ├── array-differ@1.0.0 -│ ├── array-uniq@1.0.3 -│ ├── beeper@1.1.1 -│ ├─┬ chalk@1.1.3 -│ │ ├── ansi-styles@2.2.1 -│ │ ├── escape-string-regexp@1.0.5 deduped -│ │ ├─┬ has-ansi@2.0.0 -│ │ │ └── ansi-regex@2.1.1 -│ │ ├─┬ strip-ansi@3.0.1 -│ │ │ └── ansi-regex@2.1.1 deduped -│ │ └── supports-color@2.0.0 -│ ├── dateformat@2.2.0 -│ ├─┬ fancy-log@1.3.0 -│ │ ├── chalk@1.1.3 deduped -│ │ └── time-stamp@1.1.0 -│ ├─┬ gulplog@1.0.0 -│ │ └─┬ glogg@1.0.0 -│ │ └── sparkles@1.0.0 deduped -│ ├─┬ has-gulplog@0.1.0 -│ │ └── sparkles@1.0.0 -│ ├── lodash._reescape@3.0.0 -│ ├── lodash._reevaluate@3.0.0 -│ ├── lodash._reinterpolate@3.0.0 -│ ├─┬ lodash.template@3.6.2 -│ │ ├── lodash._basecopy@3.0.1 -│ │ ├── lodash._basetostring@3.0.1 -│ │ ├── lodash._basevalues@3.0.0 -│ │ ├── lodash._isiterateecall@3.0.9 -│ │ ├── lodash._reinterpolate@3.0.0 deduped -│ │ ├─┬ lodash.escape@3.2.0 -│ │ │ └── lodash._root@3.0.1 -│ │ ├─┬ lodash.keys@3.1.2 -│ │ │ ├── lodash._getnative@3.9.1 -│ │ │ ├── lodash.isarguments@3.1.0 -│ │ │ └── lodash.isarray@3.0.4 -│ │ ├── lodash.restparam@3.6.1 -│ │ └─┬ lodash.templatesettings@3.1.1 -│ │ ├── lodash._reinterpolate@3.0.0 deduped -│ │ └── lodash.escape@3.2.0 deduped -│ ├── minimist@1.2.0 -│ ├─┬ multipipe@0.1.2 -│ │ └─┬ duplexer2@0.0.2 -│ │ └── readable-stream@1.1.14 deduped -│ ├── object-assign@3.0.0 -│ ├── replace-ext@0.0.1 -│ ├── through2@2.0.3 deduped -│ └─┬ vinyl@0.5.3 -│ ├── clone@1.0.2 -│ ├── clone-stats@0.0.1 -│ └── replace-ext@0.0.1 deduped -├─┬ jshint@2.9.5 -│ ├─┬ cli@1.0.1 -│ │ ├── exit@0.1.2 deduped -│ │ └── glob@7.1.2 deduped -│ ├─┬ console-browserify@1.1.0 -│ │ └── date-now@0.1.4 -│ ├── exit@0.1.2 -│ ├─┬ htmlparser2@3.8.3 -│ │ ├── domelementtype@1.3.0 -│ │ ├─┬ domhandler@2.3.0 -│ │ │ └── domelementtype@1.3.0 deduped -│ │ ├─┬ domutils@1.5.1 -│ │ │ ├─┬ dom-serializer@0.1.0 -│ │ │ │ ├── domelementtype@1.1.3 -│ │ │ │ └── entities@1.1.1 -│ │ │ └── domelementtype@1.3.0 deduped -│ │ ├── entities@1.0.0 -│ │ └─┬ readable-stream@1.1.14 -│ │ ├── core-util-is@1.0.2 deduped -│ │ ├── inherits@2.0.3 deduped -│ │ ├── isarray@0.0.1 -│ │ └── string_decoder@0.10.31 -│ ├── lodash@3.7.0 -│ ├─┬ minimatch@3.0.4 -│ │ └─┬ brace-expansion@1.1.8 -│ │ ├── balanced-match@1.0.0 -│ │ └── concat-map@0.0.1 -│ ├── shelljs@0.3.0 -│ └── strip-json-comments@1.0.4 -├─┬ mocha@4.0.1 -│ ├── browser-stdout@1.3.0 -│ ├── commander@2.11.0 -│ ├─┬ debug@3.1.0 -│ │ └── ms@2.0.0 -│ ├── diff@3.3.1 -│ ├── escape-string-regexp@1.0.5 -│ ├─┬ glob@7.1.2 -│ │ ├── fs.realpath@1.0.0 -│ │ ├─┬ inflight@1.0.6 -│ │ │ ├── once@1.4.0 deduped -│ │ │ └── wrappy@1.0.2 -│ │ ├── inherits@2.0.3 -│ │ ├── minimatch@3.0.4 deduped -│ │ ├─┬ once@1.4.0 -│ │ │ └── wrappy@1.0.2 deduped -│ │ └── path-is-absolute@1.0.1 -│ ├── growl@1.10.3 -│ ├── he@1.1.1 -│ ├─┬ mkdirp@0.5.1 -│ │ └── minimist@0.0.8 -│ └─┬ supports-color@4.4.0 -│ └── has-flag@2.0.0 -├─┬ promise@8.0.1 -│ └── asap@2.0.6 -├─┬ should@13.1.2 -│ ├─┬ should-equal@2.0.0 -│ │ └── should-type@1.4.0 deduped -│ ├─┬ should-format@3.0.3 -│ │ ├── should-type@1.4.0 deduped -│ │ └── should-type-adaptors@1.0.1 deduped -│ ├── should-type@1.4.0 -│ ├─┬ should-type-adaptors@1.0.1 -│ │ ├── should-type@1.4.0 deduped -│ │ └── should-util@1.0.0 deduped -│ └── should-util@1.0.0 -└─┬ through2@2.0.3 - ├─┬ readable-stream@2.3.3 - │ ├── core-util-is@1.0.2 - │ ├── inherits@2.0.3 deduped - │ ├── isarray@1.0.0 - │ ├── process-nextick-args@1.0.7 - │ ├── safe-buffer@5.1.1 - │ ├─┬ string_decoder@1.0.3 - │ │ └── safe-buffer@5.1.1 deduped - │ └── util-deprecate@1.0.2 - └── xtend@4.0.1 - diff --git a/node_modules/gulp-json-transform/package.json b/node_modules/gulp-json-transform/package.json deleted file mode 100644 index 1526c9a97..000000000 --- a/node_modules/gulp-json-transform/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "gulp-json-transform", - "version": "0.4.5", - "description": - "A gulp plugin to transform json files, pipe json files through it and transform them to other json files or other formats.", - "main": "./index.js", - "scripts": { - "test": "mocha" - }, - "repository": { - "type": "git", - "url": "git@github.com:thaggie/gulp-json-transform.git" - }, - "bugs": "https://github.com/thaggie/gulp-json-transform/issues", - "homepage": "https://github.com/thaggie/gulp-json-transform", - "keywords": ["gulp", "plugin", "transform", "json"], - "author": { - "name": "Tom Haggie", - "url": "https://github.com/thaggie" - }, - "license": "MIT", - "devDependencies": { - "jshint": "^2.9.2", - "mocha": "^4.0.1", - "should": "^13.1.2" - }, - "dependencies": { - "gulp-util": "^3.0.8", - "promise": "^8.0.1", - "through2": "^2.0.3" - }, - "engines": { - "node": ">=4.8.4" - } -} |