Added Gulp.js for compiling SCSS stylesheets
This commit is contained in:
21
node_modules/replace-homedir/LICENSE
generated
vendored
Normal file
21
node_modules/replace-homedir/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
|
||||
|
||||
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.
|
48
node_modules/replace-homedir/README.md
generated
vendored
Normal file
48
node_modules/replace-homedir/README.md
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
<p align="center">
|
||||
<a href="http://gulpjs.com">
|
||||
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# replace-homedir
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
|
||||
|
||||
Replace user home in a string with another string. Useful for tildifying a path.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var replaceHomedir = require('replace-homedir');
|
||||
|
||||
var shortPath = replaceHomedir('/Users/phated/myProject', '~');
|
||||
// shortPath === '~/myProject'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `replaceHomedir(path, replacement)`
|
||||
|
||||
Takes a string `path` as the first argument and a string or function `replacement` as the second argument. If the `path` is absolute and begins with the User's homedir, the homedir portion of the path is replaced with `replacement` using String#replace.
|
||||
|
||||
If `path` is not a string, the function will throw.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[downloads-image]: http://img.shields.io/npm/dm/replace-homedir.svg
|
||||
[npm-url]: https://www.npmjs.com/package/replace-homedir
|
||||
[npm-image]: http://img.shields.io/npm/v/replace-homedir.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/replace-homedir
|
||||
[travis-image]: http://img.shields.io/travis/gulpjs/replace-homedir.svg?label=travis-ci
|
||||
|
||||
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-homedir
|
||||
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-homedir.svg?label=appveyor
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/replace-homedir
|
||||
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-homedir/master.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
|
29
node_modules/replace-homedir/index.js
generated
vendored
Normal file
29
node_modules/replace-homedir/index.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
|
||||
var homedir = require('homedir-polyfill');
|
||||
var isAbsolute = require('is-absolute');
|
||||
var removeTrailingSep = require('remove-trailing-separator');
|
||||
|
||||
function replaceHomedir(filepath, replacement) {
|
||||
if (typeof filepath !== 'string') {
|
||||
throw new Error('Path for replace-homedir must be a string.');
|
||||
}
|
||||
|
||||
if (!isAbsolute(filepath)) {
|
||||
return filepath;
|
||||
}
|
||||
|
||||
var home = removeTrailingSep(homedir());
|
||||
var lookupHome = home + path.sep;
|
||||
var lookupPath = removeTrailingSep(filepath) + path.sep;
|
||||
|
||||
if (lookupPath.indexOf(lookupHome) !== 0) {
|
||||
return filepath;
|
||||
}
|
||||
|
||||
return filepath.replace(home, replacement);
|
||||
}
|
||||
|
||||
module.exports = replaceHomedir;
|
50
node_modules/replace-homedir/package.json
generated
vendored
Normal file
50
node_modules/replace-homedir/package.json
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "replace-homedir",
|
||||
"version": "1.0.0",
|
||||
"description": "Replace user home in a string with another string. Useful for tildifying a path.",
|
||||
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
|
||||
"contributors": [
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com>"
|
||||
],
|
||||
"repository": "gulpjs/replace-homedir",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint . && jscs index.js test/",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --async-only",
|
||||
"cover": "istanbul cover _mocha --report lcovonly",
|
||||
"coveralls": "npm run cover && istanbul-coveralls"
|
||||
},
|
||||
"dependencies": {
|
||||
"homedir-polyfill": "^1.0.1",
|
||||
"is-absolute": "^1.0.0",
|
||||
"remove-trailing-separator": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^1.7.3",
|
||||
"eslint-config-gulp": "^2.0.0",
|
||||
"expect": "^1.20.2",
|
||||
"istanbul": "^0.4.3",
|
||||
"istanbul-coveralls": "^1.0.3",
|
||||
"jscs": "^2.3.5",
|
||||
"jscs-preset-gulp": "^1.0.0",
|
||||
"mocha": "^2.4.5"
|
||||
},
|
||||
"keywords": [
|
||||
"path",
|
||||
"homedir",
|
||||
"tilde",
|
||||
"replace",
|
||||
"subsitute",
|
||||
"user home",
|
||||
"tilde"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user