forked from enviPath/enviPy
Current Dev State
This commit is contained in:
20
static/js/ketcher2/node_modules/gulp-clean-css/LICENSE
generated
vendored
Normal file
20
static/js/ketcher2/node_modules/gulp-clean-css/LICENSE
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2017 scniro <scniro@outlook.com>
|
||||
|
||||
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.
|
||||
78
static/js/ketcher2/node_modules/gulp-clean-css/README.md
generated
vendored
Normal file
78
static/js/ketcher2/node_modules/gulp-clean-css/README.md
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
# gulp-clean-css
|
||||
|
||||
[](https://travis-ci.org/scniro/gulp-clean-css)
|
||||
[](https://www.npmjs.com/package/gulp-clean-css)
|
||||
[](https://david-dm.org/scniro/gulp-clean-css)
|
||||
[](https://david-dm.org/scniro/gulp-clean-css#info=devDependencies)
|
||||
[](https://coveralls.io/github/scniro/gulp-clean-css)
|
||||
[](https://codeclimate.com/github/scniro/gulp-clean-css)
|
||||
|
||||
> [gulp](http://gulpjs.com/) plugin to minify CSS, using [clean-css](https://github.com/jakubpawlowicz/clean-css)
|
||||
|
||||
## Regarding Issues
|
||||
|
||||
This is just a simple [gulp](https://github.com/gulpjs/gulp) plugin, which means it's nothing more than a thin wrapper around `clean-css`. If it looks like you are having CSS related issues, please contact [clean-css](https://github.com/jakubpawlowicz/clean-css/issues). Only create a new issue if it looks like you're having a problem with the plugin itself.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install gulp-clean-css --save-dev
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### cleanCSS([*options*], [*callback*])
|
||||
|
||||
#### options
|
||||
|
||||
See the [`CleanCSS` options](https://github.com/jakubpawlowicz/clean-css#how-to-use-clean-css-api).
|
||||
|
||||
```javascript
|
||||
var gulp = require('gulp');
|
||||
var cleanCSS = require('gulp-clean-css');
|
||||
|
||||
gulp.task('minify-css', function() {
|
||||
return gulp.src('styles/*.css')
|
||||
.pipe(cleanCSS({compatibility: 'ie8'}))
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
```
|
||||
|
||||
#### callback
|
||||
|
||||
Useful for returning details from the underlying [`minify()`](https://github.com/jakubpawlowicz/clean-css#using-api) call. An example use case could include logging `stats` of the minified file. In addition to the default object, `gulp-clean-css` provides the file `name` and `path` for further analysis.
|
||||
|
||||
```javascript
|
||||
var gulp = require('gulp');
|
||||
var cleanCSS = require('gulp-clean-css');
|
||||
|
||||
gulp.task('minify-css', function() {
|
||||
return gulp.src('styles/*.css')
|
||||
.pipe(cleanCSS({debug: true}, function(details) {
|
||||
console.log(details.name + ': ' + details.stats.originalSize);
|
||||
console.log(details.name + ': ' + details.stats.minifiedSize);
|
||||
}))
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
```
|
||||
|
||||
[Source Maps](http://www.html5rocks.com/tutorials/developertools/sourcemaps/) can be generated by using [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps).
|
||||
|
||||
```javascript
|
||||
|
||||
var gulp = require('gulp');
|
||||
var cleanCSS = require('gulp-clean-css');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
|
||||
gulp.task('minify-css', function() {
|
||||
return gulp.src('./src/*.css')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(cleanCSS())
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('dist'));
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](./LICENSE) © 2016 [scniro](https://github.com/scniro)
|
||||
75
static/js/ketcher2/node_modules/gulp-clean-css/index.js
generated
vendored
Normal file
75
static/js/ketcher2/node_modules/gulp-clean-css/index.js
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
'use strict';
|
||||
|
||||
const applySourceMap = require('vinyl-sourcemaps-apply');
|
||||
const CleanCSS = require('clean-css');
|
||||
const path = require('path');
|
||||
const PluginError = require('gulp-util').PluginError;
|
||||
const through = require('through2');
|
||||
|
||||
module.exports = function gulpCleanCSS(options, callback) {
|
||||
|
||||
options = options || {};
|
||||
|
||||
if (arguments.length === 1 && Object.prototype.toString.call(arguments[0]) === '[object Function]')
|
||||
callback = arguments[0];
|
||||
|
||||
let transform = function (file, enc, cb) {
|
||||
|
||||
if (!file || !file.contents)
|
||||
return cb(null, file);
|
||||
|
||||
if (file.isStream()) {
|
||||
this.emit('error', new PluginError('gulp-clean-css', 'Streaming not supported!'));
|
||||
return cb(null, file);
|
||||
}
|
||||
|
||||
if (file.sourceMap)
|
||||
options.sourceMap = JSON.parse(JSON.stringify(file.sourceMap));
|
||||
|
||||
if (options.rebaseTo) {
|
||||
|
||||
let relative = path.resolve(file.path, options.rebaseTo);
|
||||
options.rebaseTo = path.relative(relative, file.path)
|
||||
}
|
||||
|
||||
let style = file.contents ? file.contents.toString() : '';
|
||||
|
||||
new CleanCSS(options).minify(style, function (errors, css) {
|
||||
|
||||
if (errors)
|
||||
return cb(errors.join(' '));
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
let details = {
|
||||
'stats': css.stats,
|
||||
'errors': css.errors,
|
||||
'warnings': css.warnings,
|
||||
'path': file.path,
|
||||
'name': file.path.split(file.base)[1]
|
||||
};
|
||||
|
||||
if (css.sourceMap)
|
||||
details['sourceMap'] = css.sourceMap;
|
||||
|
||||
callback(details);
|
||||
}
|
||||
|
||||
file.contents = new Buffer(css.styles);
|
||||
|
||||
if (css.sourceMap) {
|
||||
|
||||
let map = JSON.parse(css.sourceMap);
|
||||
map.file = path.relative(file.base, file.path);
|
||||
map.sources = map.sources.map(function (src) {
|
||||
return path.relative(file.base, file.path)
|
||||
});
|
||||
|
||||
applySourceMap(file, map);
|
||||
}
|
||||
|
||||
cb(null, file);
|
||||
});
|
||||
};
|
||||
|
||||
return through.obj(transform);
|
||||
};
|
||||
85
static/js/ketcher2/node_modules/gulp-clean-css/package.json
generated
vendored
Normal file
85
static/js/ketcher2/node_modules/gulp-clean-css/package.json
generated
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
{
|
||||
"_from": "gulp-clean-css@3.1.1",
|
||||
"_id": "gulp-clean-css@3.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-u2VkBU6NaO8c7cNPMvvwQGRtaH4=",
|
||||
"_location": "/gulp-clean-css",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "gulp-clean-css@3.1.1",
|
||||
"name": "gulp-clean-css",
|
||||
"escapedName": "gulp-clean-css",
|
||||
"rawSpec": "3.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-3.1.1.tgz",
|
||||
"_shasum": "bb6564054e8d68ef1cedc34f32fbf040646d687e",
|
||||
"_spec": "gulp-clean-css@3.1.1",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher",
|
||||
"author": {
|
||||
"name": "scniro"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/scniro/gulp-clean-css/issues",
|
||||
"email": "scniro@outlook.com"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"clean-css": "4.1.0",
|
||||
"gulp-util": "3.0.8",
|
||||
"through2": "2.0.3",
|
||||
"vinyl-sourcemaps-apply": "0.2.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Minify css with clean-css.",
|
||||
"devDependencies": {
|
||||
"chai": "3.5.0",
|
||||
"chai-string": "1.3.0",
|
||||
"coveralls": "2.13.1",
|
||||
"del": "2.2.2",
|
||||
"express": "4.15.2",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-concat": "2.6.1",
|
||||
"gulp-istanbul": "1.1.1",
|
||||
"gulp-mocha": "4.3.1",
|
||||
"gulp-rename": "1.2.2",
|
||||
"gulp-sass": "3.1.0",
|
||||
"gulp-sourcemaps": "2.6.0",
|
||||
"mocha": "3.3.0",
|
||||
"vinyl": "2.0.2",
|
||||
"vinyl-buffer": "1.0.0",
|
||||
"vinyl-fs-fake": "1.1.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/scniro/gulp-clean-css#readme",
|
||||
"keywords": [
|
||||
"css",
|
||||
"clean",
|
||||
"minify",
|
||||
"uglify",
|
||||
"clean-css",
|
||||
"minify-css",
|
||||
"gulp-minify-css",
|
||||
"gulp-clean-css",
|
||||
"gulpplugin",
|
||||
"gulpfriendly"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "gulp-clean-css",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/scniro/gulp-clean-css.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "gulp test"
|
||||
},
|
||||
"version": "3.1.1"
|
||||
}
|
||||
Reference in New Issue
Block a user