--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
19
node_modules/parse-import/LICENSE.md
generated
vendored
Normal file
19
node_modules/parse-import/LICENSE.md
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) Kevin Mårtensson
|
||||
|
||||
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.
|
||||
37
node_modules/parse-import/README.md
generated
vendored
Normal file
37
node_modules/parse-import/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# parse-import [](https://travis-ci.org/kevva/parse-import)
|
||||
|
||||
> Parse CSS `@import` statements.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save parse-import
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var parseImport = require('parse-import');
|
||||
var str = [
|
||||
'@import url("foo.css");',
|
||||
'@import "bar.css" only screen and (min-width: 25em);'
|
||||
].join(' ');
|
||||
|
||||
parseImport(str);
|
||||
|
||||
/*
|
||||
[{
|
||||
path: 'foo.css',
|
||||
condition: '',
|
||||
rule: '@import url("foo.css")'
|
||||
}, {
|
||||
path: 'bar.css',
|
||||
condition: 'only screen and (min-width: 25em)',
|
||||
rule: '@import "bar.css" only screen and (min-width: 25em)'
|
||||
}]
|
||||
*/
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
||||
52
node_modules/parse-import/index.js
generated
vendored
Normal file
52
node_modules/parse-import/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
'use strict';
|
||||
|
||||
var getImports = require('get-imports');
|
||||
|
||||
/**
|
||||
* Get path from @import
|
||||
*
|
||||
* @param {String} str
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function path(str) {
|
||||
return /(?:url\()(?:.*?)(?:\))|(["\'])(?:[^"\')]+)\1/ig.exec(str)[0]
|
||||
.replace(/(?:url\()/ig, '')
|
||||
.replace(/(?:\))/g, '')
|
||||
.replace(/(?:["\'])/g, '')
|
||||
.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get condition from @import
|
||||
*
|
||||
* @param {String} str
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function condition(str) {
|
||||
return str.replace(/(?:url\()(?:.*?)(?:\))|(["\'])(?:[^"\')]+)\1/ig, '')
|
||||
.replace(/(?:@import)(?:\s)*/g, '')
|
||||
.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse @import statements
|
||||
*
|
||||
* @param {String} str
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function (str) {
|
||||
var imports = getImports(str);
|
||||
|
||||
return imports.map(function (imp) {
|
||||
imp = imp.replace(/(?:;)$/g, '');
|
||||
|
||||
return {
|
||||
path: path(imp),
|
||||
condition: condition(imp),
|
||||
rule: imp
|
||||
};
|
||||
});
|
||||
};
|
||||
97
node_modules/parse-import/package.json
generated
vendored
Normal file
97
node_modules/parse-import/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "parse-import@^2.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "parse-import",
|
||||
"name": "parse-import",
|
||||
"rawSpec": "^2.0.0",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/jose/Documents/GitHub/Mods/node_modules/gulp-concat-css"
|
||||
]
|
||||
],
|
||||
"_from": "parse-import@>=2.0.0 <3.0.0",
|
||||
"_id": "parse-import@2.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/parse-import",
|
||||
"_nodeVersion": "0.10.32",
|
||||
"_npmUser": {
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.1.7",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "parse-import@^2.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "parse-import",
|
||||
"name": "parse-import",
|
||||
"rawSpec": "^2.0.0",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-concat-css",
|
||||
"/rework-import"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/parse-import/-/parse-import-2.0.0.tgz",
|
||||
"_shasum": "2b2474030e008ab98db76c4bcbf4db5ae7306f5f",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "parse-import@^2.0.0",
|
||||
"_where": "/Users/jose/Documents/GitHub/Mods/node_modules/gulp-concat-css",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "https://github.com/kevva"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kevva/parse-import/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"get-imports": "^1.0.0"
|
||||
},
|
||||
"description": "Parse CSS @import statements",
|
||||
"devDependencies": {
|
||||
"ava": "^0.0.4"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "2b2474030e008ab98db76c4bcbf4db5ae7306f5f",
|
||||
"tarball": "https://registry.npmjs.org/parse-import/-/parse-import-2.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "11f15aa21818adce1cd8cb3741a30c03a99e5975",
|
||||
"homepage": "https://github.com/kevva/parse-import",
|
||||
"keywords": [
|
||||
"css",
|
||||
"import",
|
||||
"object",
|
||||
"parse"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "parse-import",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kevva/parse-import.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
||||
Loading…
Reference in a new issue