Added Gulp.js for compiling SCSS stylesheets
This commit is contained in:
21
node_modules/each-props/LICENSE
generated
vendored
Normal file
21
node_modules/each-props/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Takayuki Sato
|
||||
|
||||
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.
|
125
node_modules/each-props/README.md
generated
vendored
Normal file
125
node_modules/each-props/README.md
generated
vendored
Normal file
@ -0,0 +1,125 @@
|
||||
# [each-props][repo-url] [![NPM][npm-img]][npm-url] [![MIT License][mit-img]][mit-url] [![Build Status][travis-img]][travis-url] [![Build Status][appveyor-img]][appveyor-url] [![Coverage Status][coverage-img]][coverage-url]
|
||||
|
||||
Processes each properties of an object deeply.
|
||||
|
||||
## Install
|
||||
|
||||
To install from npm:
|
||||
|
||||
```sh
|
||||
$ npm i each-props --save
|
||||
```
|
||||
|
||||
## Load this module
|
||||
|
||||
For Node.js:
|
||||
|
||||
```js
|
||||
const eachProps = require('each-props');
|
||||
```
|
||||
|
||||
For Web browser:
|
||||
|
||||
```html
|
||||
<script src="each-props.min.js"></script>
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Apply a function to all (non plain object) properties.
|
||||
|
||||
```js
|
||||
var obj = { a: 1, b: { c: 'CCC', d: { e: 'EEE' } } };
|
||||
|
||||
eachProps(obj, function(value, keyChain, nodeInfo) {
|
||||
if (keyChain === 'a') {
|
||||
nodeInfo.parent['a'] = value * 2;
|
||||
} else if (keyChain === 'b.c') {
|
||||
nodeInfo.parent['c'] = value.toLowerCase();
|
||||
} else if (keyChain === 'b.d') {
|
||||
return true; // stop to dig
|
||||
} else if (keyChain === 'b.d.e') {
|
||||
nodeInfo.parent['e'] = value.toLowerCase();
|
||||
}
|
||||
});
|
||||
|
||||
console.log(obj);
|
||||
// => { a: 2, b: { c: 'ccc', d: { e: 'EEE' } } };
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### <u>eachProps(obj, fn [, opts]) : void</u>
|
||||
|
||||
Executes the *fn* function for all properties.
|
||||
|
||||
#### Parameters:
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|:------------|:------:|:-----------------------------------------------|
|
||||
| *obj* | object | A plain object to be treated. |
|
||||
| *fn* |function| A function to operate each properties. |
|
||||
| *opts* | object | An object to pass any data to each properties. |
|
||||
|
||||
* **API of *fn* function**
|
||||
|
||||
#### <u>fn(value, keyChain, nodeInfo) : boolean</u>
|
||||
|
||||
This function is applied to all properties in an object.
|
||||
|
||||
##### Parameters:
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|:------------|:------:|:-----------------------------------------------|
|
||||
| *value* | any | A property value. |
|
||||
| *keyChain* | string | A string concatenating the hierarchical keys with dots. |
|
||||
| *nodeInfo* | object | An object which contains node informations (See [below](#nodeinfo)). |
|
||||
|
||||
##### Returns:
|
||||
|
||||
True, if stops digging child properties.
|
||||
|
||||
**Type:** boolean
|
||||
|
||||
<a name="nodeinfo"></a>
|
||||
|
||||
* **Properties of <i>nodeInfo</i>**
|
||||
|
||||
| Properties | Type | Description |
|
||||
|:-------------|:------:|:-----------------------------------------|
|
||||
| *name* | string | The property name of this node. |
|
||||
| *index* | number | The index of the property among the sibling properties. |
|
||||
| *count* | number | The count of the sibling properties. |
|
||||
| *depth* | number | The depth of the property. |
|
||||
| *parent* | object | The parent node of the property. |
|
||||
| *sort* |function| A sort function which orders the child properties. This function is inherited from *opts*, if be specified. |
|
||||
|
||||
... and any properties inherited from *opts*.
|
||||
|
||||
* **Properties of <i>opts</i>**
|
||||
|
||||
| Properties | Type | Description |
|
||||
|:-------------|:------:|:-----------------------------------------|
|
||||
| *sort* |function| A sort function which orders the same level properties. (Optional) |
|
||||
|
||||
... and any properties you want to pass to each node.
|
||||
|
||||
## License
|
||||
|
||||
Copyright (C) 2016-2018 Takayuki Sato
|
||||
|
||||
This program is free software under [MIT][mit-url] License.
|
||||
See the file LICENSE in this distribution for more details.
|
||||
|
||||
[repo-url]: https://github.com/sttk/each-props/
|
||||
[npm-img]: https://img.shields.io/badge/npm-v1.3.2-blue.svg
|
||||
[npm-url]: https://www.npmjs.org/package/each-props/
|
||||
[mit-img]: https://img.shields.io/badge/license-MIT-green.svg
|
||||
[mit-url]: https://opensource.org/licenses.MIT
|
||||
[travis-img]: https://travis-ci.org/sttk/each-props.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/sttk/each-props
|
||||
[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/sttk/each-props?branch=master&svg=true
|
||||
[appveyor-url]: https://ci.appveyor.com/project/sttk/each-props
|
||||
[coverage-img]: https://coveralls.io/repos/github/sttk/each-props/badge.svg?branch=master
|
||||
[coverage-url]: https://coveralls.io/github/sttk/each-props?branch=master
|
||||
|
57
node_modules/each-props/index.js
generated
vendored
Normal file
57
node_modules/each-props/index.js
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
'use strict';
|
||||
|
||||
var isPlainObject = require('is-plain-object');
|
||||
var defaults = require('object.defaults/immutable');
|
||||
|
||||
module.exports = function(obj, fn, opts) {
|
||||
if (!isObject(obj)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof fn !== 'function') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isPlainObject(opts)) {
|
||||
opts = {};
|
||||
}
|
||||
|
||||
forEachChild(obj, '', fn, 0, opts);
|
||||
};
|
||||
|
||||
function forEachChild(node, baseKey, fn, depth, opts) {
|
||||
var keys = Object.keys(node);
|
||||
if (typeof opts.sort === 'function') {
|
||||
var sortedKeys = opts.sort(keys);
|
||||
if (Array.isArray(sortedKeys)) {
|
||||
keys = sortedKeys;
|
||||
}
|
||||
}
|
||||
|
||||
depth += 1;
|
||||
|
||||
for (var i = 0, n = keys.length; i < n; i++) {
|
||||
var key = keys[i];
|
||||
var keyChain = baseKey + '.' + key;
|
||||
var value = node[key];
|
||||
|
||||
var nodeInfo = defaults(opts);
|
||||
nodeInfo.name = key;
|
||||
nodeInfo.index = i;
|
||||
nodeInfo.count = n;
|
||||
nodeInfo.depth = depth;
|
||||
nodeInfo.parent = node;
|
||||
|
||||
var notDigg = fn(value, keyChain.slice(1), nodeInfo);
|
||||
if (notDigg || !isPlainObject(value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
forEachChild(value, keyChain, fn, depth, opts);
|
||||
}
|
||||
}
|
||||
|
||||
function isObject(v) {
|
||||
return Object.prototype.toString.call(v) === '[object Object]';
|
||||
}
|
||||
|
21
node_modules/each-props/node_modules/is-plain-object/LICENSE
generated
vendored
Normal file
21
node_modules/each-props/node_modules/is-plain-object/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
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.
|
104
node_modules/each-props/node_modules/is-plain-object/README.md
generated
vendored
Normal file
104
node_modules/each-props/node_modules/is-plain-object/README.md
generated
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
# is-plain-object [](https://www.npmjs.com/package/is-plain-object) [](https://npmjs.org/package/is-plain-object) [](https://npmjs.org/package/is-plain-object) [](https://travis-ci.org/jonschlinkert/is-plain-object)
|
||||
|
||||
> Returns true if an object was created by the `Object` constructor.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save is-plain-object
|
||||
```
|
||||
|
||||
Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isPlainObject = require('is-plain-object');
|
||||
```
|
||||
|
||||
**true** when created by the `Object` constructor.
|
||||
|
||||
```js
|
||||
isPlainObject(Object.create({}));
|
||||
//=> true
|
||||
isPlainObject(Object.create(Object.prototype));
|
||||
//=> true
|
||||
isPlainObject({foo: 'bar'});
|
||||
//=> true
|
||||
isPlainObject({});
|
||||
//=> true
|
||||
```
|
||||
|
||||
**false** when not created by the `Object` constructor.
|
||||
|
||||
```js
|
||||
isPlainObject(1);
|
||||
//=> false
|
||||
isPlainObject(['foo', 'bar']);
|
||||
//=> false
|
||||
isPlainObject([]);
|
||||
//=> false
|
||||
isPlainObject(new Foo);
|
||||
//=> false
|
||||
isPlainObject(null);
|
||||
//=> false
|
||||
isPlainObject(Object.create(null));
|
||||
//=> false
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
|
||||
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
|
||||
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 17 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 6 | [stevenvachon](https://github.com/stevenvachon) |
|
||||
| 3 | [onokumus](https://github.com/onokumus) |
|
||||
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2017._
|
5
node_modules/each-props/node_modules/is-plain-object/index.d.ts
generated
vendored
Normal file
5
node_modules/each-props/node_modules/is-plain-object/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export = isPlainObject;
|
||||
|
||||
declare function isPlainObject(o: any): boolean;
|
||||
|
||||
declare namespace isPlainObject {}
|
37
node_modules/each-props/node_modules/is-plain-object/index.js
generated
vendored
Normal file
37
node_modules/each-props/node_modules/is-plain-object/index.js
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var isObject = require('isobject');
|
||||
|
||||
function isObjectObject(o) {
|
||||
return isObject(o) === true
|
||||
&& Object.prototype.toString.call(o) === '[object Object]';
|
||||
}
|
||||
|
||||
module.exports = function isPlainObject(o) {
|
||||
var ctor,prot;
|
||||
|
||||
if (isObjectObject(o) === false) return false;
|
||||
|
||||
// If has modified constructor
|
||||
ctor = o.constructor;
|
||||
if (typeof ctor !== 'function') return false;
|
||||
|
||||
// If has modified prototype
|
||||
prot = ctor.prototype;
|
||||
if (isObjectObject(prot) === false) return false;
|
||||
|
||||
// If constructor does not have an Object-specific method
|
||||
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Most likely a plain Object
|
||||
return true;
|
||||
};
|
79
node_modules/each-props/node_modules/is-plain-object/package.json
generated
vendored
Normal file
79
node_modules/each-props/node_modules/is-plain-object/package.json
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
{
|
||||
"name": "is-plain-object",
|
||||
"description": "Returns true if an object was created by the `Object` constructor.",
|
||||
"version": "2.0.4",
|
||||
"homepage": "https://github.com/jonschlinkert/is-plain-object",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Osman Nuri Okumuş (http://onokumus.com)",
|
||||
"Steven Vachon (https://svachon.com)",
|
||||
"(https://github.com/wtgtybhertgeghgtwtg)"
|
||||
],
|
||||
"repository": "jonschlinkert/is-plain-object",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/is-plain-object/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js",
|
||||
"test_browser": "mocha-phantomjs test/browser.html",
|
||||
"test_node": "mocha",
|
||||
"test": "npm run test_node && npm run browserify && npm run test_browser"
|
||||
},
|
||||
"dependencies": {
|
||||
"isobject": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^14.4.0",
|
||||
"chai": "^4.0.2",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"mocha": "^3.4.2",
|
||||
"mocha-phantomjs": "^4.1.0",
|
||||
"phantomjs": "^2.1.7",
|
||||
"uglify-js": "^3.0.24"
|
||||
},
|
||||
"keywords": [
|
||||
"check",
|
||||
"is",
|
||||
"is-object",
|
||||
"isobject",
|
||||
"javascript",
|
||||
"kind",
|
||||
"kind-of",
|
||||
"object",
|
||||
"plain",
|
||||
"type",
|
||||
"typeof",
|
||||
"value"
|
||||
],
|
||||
"types": "index.d.ts",
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"is-number",
|
||||
"isobject",
|
||||
"kind-of"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
50
node_modules/each-props/package.json
generated
vendored
Normal file
50
node_modules/each-props/package.json
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "each-props",
|
||||
"version": "1.3.2",
|
||||
"description": "Processes each properties of an object deeply.",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"test": "mocha",
|
||||
"coverage": "nyc --reporter=lcov --reporter=text-summary npm test",
|
||||
"coveralls": "nyc --reporter=text-lcov npm test | coveralls",
|
||||
"web:build": "browserify index.js --standalone eachProps -o web/each-props.js && cd web && uglifyjs each-props.js --compress --mangle -o each-props.min.js --source-map url=each-props.min.js.map",
|
||||
"chrome:install": "npm i --no-save mocha-chrome",
|
||||
"chrome:test": "mocha-chrome test/web/browser-test.html",
|
||||
"build": "npm run lint && npm run coverage && npm run web:build && node test/web/make.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sttk/each-props.git"
|
||||
},
|
||||
"keywords": [
|
||||
"deep",
|
||||
"each",
|
||||
"object",
|
||||
"property",
|
||||
"properties",
|
||||
"props"
|
||||
],
|
||||
"author": "Takayuki Sato",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sttk/each-props/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sttk/each-props#readme",
|
||||
"dependencies": {
|
||||
"is-plain-object": "^2.0.1",
|
||||
"object.defaults": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^16.2.2",
|
||||
"chai": "^3.5.0",
|
||||
"coveralls": "^3.0.1",
|
||||
"eslint": "^4.19.1",
|
||||
"mocha": "^3.2.0",
|
||||
"nyc": "^11.7.2",
|
||||
"uglify-js": "^3.3.24"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user