added whole system from ola4doc

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-14 17:06:06 +01:00
parent 9646c74be1
commit 0611418f7a
8725 changed files with 817688 additions and 2 deletions
+52
View File
@@ -0,0 +1,52 @@
'use strict';
var gutil = require('gulp-util');
var through = require('through2');
var applySourceMap = require('vinyl-sourcemaps-apply');
var autoprefixer = require('autoprefixer');
var postcss = require('postcss');
module.exports = function (opts) {
return through.obj(function (file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()) {
cb(new gutil.PluginError('gulp-autoprefixer', 'Streaming not supported'));
return;
}
postcss(autoprefixer(opts)).process(file.contents.toString(), {
map: file.sourceMap ? {annotation: false} : false,
from: file.path,
to: file.path
}).then(function (res) {
file.contents = new Buffer(res.css);
if (res.map && file.sourceMap) {
applySourceMap(file, res.map.toString());
}
var warnings = res.warnings();
if (warnings.length > 0) {
gutil.log('gulp-autoprefixer:', '\n ' + warnings.join('\n '));
}
setImmediate(cb, null, file);
}).catch(function (err) {
var cssError = err.name === 'CssSyntaxError';
if (cssError) {
err.message += err.showSourceCode();
}
// prevent stream unhandled exception from being suppressed by Promise
setImmediate(cb, new gutil.PluginError('gulp-autoprefixer', err, {
fileName: file.path,
showStack: !cssError
}));
});
});
};
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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.
+115
View File
@@ -0,0 +1,115 @@
{
"_args": [
[
{
"raw": "gulp-autoprefixer@^3.1.0",
"scope": null,
"escapedName": "gulp-autoprefixer",
"name": "gulp-autoprefixer",
"rawSpec": "^3.1.0",
"spec": ">=3.1.0 <4.0.0",
"type": "range"
},
"/mnt/Data/bach/Documents/ola/OLA#3DOC/sys"
]
],
"_from": "gulp-autoprefixer@>=3.1.0 <4.0.0",
"_id": "gulp-autoprefixer@3.1.1",
"_inCache": true,
"_location": "/gulp-autoprefixer",
"_nodeVersion": "4.4.5",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/gulp-autoprefixer-3.1.1.tgz_1471047423150_0.8203879201319069"
},
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"raw": "gulp-autoprefixer@^3.1.0",
"scope": null,
"escapedName": "gulp-autoprefixer",
"name": "gulp-autoprefixer",
"rawSpec": "^3.1.0",
"spec": ">=3.1.0 <4.0.0",
"type": "range"
},
"_requiredBy": [
"#DEV:/"
],
"_resolved": "https://registry.npmjs.org/gulp-autoprefixer/-/gulp-autoprefixer-3.1.1.tgz",
"_shasum": "75230051cd0d171343d783b7e9b5d1120eeef9b0",
"_shrinkwrap": null,
"_spec": "gulp-autoprefixer@^3.1.0",
"_where": "/mnt/Data/bach/Documents/ola/OLA#3DOC/sys",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/gulp-autoprefixer/issues"
},
"dependencies": {
"autoprefixer": "^6.0.0",
"gulp-util": "^3.0.0",
"postcss": "^5.0.4",
"through2": "^2.0.0",
"vinyl-sourcemaps-apply": "^0.2.0"
},
"description": "Prefix CSS",
"devDependencies": {
"gulp-sourcemaps": "^1.1.1",
"mocha": "*",
"xo": "*"
},
"directories": {},
"dist": {
"shasum": "75230051cd0d171343d783b7e9b5d1120eeef9b0",
"tarball": "https://registry.npmjs.org/gulp-autoprefixer/-/gulp-autoprefixer-3.1.1.tgz"
},
"engines": {
"node": ">=0.12.0"
},
"files": [
"index.js"
],
"gitHead": "a276609e9c3824f163435aaf2488f926eb1daba3",
"homepage": "https://github.com/sindresorhus/gulp-autoprefixer#readme",
"keywords": [
"gulpplugin",
"autoprefixer",
"postcss",
"css",
"prefix",
"prefixes",
"stylesheet",
"preprocess",
"postcss-runner"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
{
"name": "battaglr",
"email": "lucianobattagliero+npm@gmail.com"
}
],
"name": "gulp-autoprefixer",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/gulp-autoprefixer.git"
},
"scripts": {
"test": "xo && mocha"
},
"version": "3.1.1"
}
+75
View File
@@ -0,0 +1,75 @@
# gulp-autoprefixer [![Build Status](https://travis-ci.org/sindresorhus/gulp-autoprefixer.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-autoprefixer)
> Prefix CSS with [Autoprefixer](https://github.com/postcss/autoprefixer)
*Issues with the output should be reported on the Autoprefixer [issue tracker](https://github.com/postcss/autoprefixer/issues).*
---
<p align="center"><b>🔥 Want to strengthen your core JavaScript skills and master ES6?</b><br>I would personally recommend this awesome <a href="https://ES6.io/friend/AWESOME">ES6 course</a> by Wes Bos.</p>
---
## Install
```
$ npm install --save-dev gulp-autoprefixer
```
## Usage
```js
const gulp = require('gulp');
const autoprefixer = require('gulp-autoprefixer');
gulp.task('default', () =>
gulp.src('src/app.css')
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(gulp.dest('dist'))
);
```
## API
### autoprefixer([options])
#### options
See the Autoprefixer [options](https://github.com/postcss/autoprefixer#options).
## Source Maps
Use [gulp-sourcemaps](https://github.com/floridoo/gulp-sourcemaps) like this:
```js
const gulp = require('gulp');
const sourcemaps = require('gulp-sourcemaps');
const autoprefixer = require('gulp-autoprefixer');
const concat = require('gulp-concat');
gulp.task('default', () =>
gulp.src('src/**/*.css')
.pipe(sourcemaps.init())
.pipe(autoprefixer())
.pipe(concat('all.css'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist'))
);
```
## Tip
You might want to use Autoprefixer as a [PostCSS plugin](https://github.com/postcss/autoprefixer#gulp) if you use other PostCSS plugins in your build process.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)