Socket
Socket
Sign inDemoInstall

gh-pages

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-pages - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

9

changelog.md

@@ -0,1 +1,10 @@

## v0.11.0
* [#61](https://github.com/tschaub/gh-pages/pull/61) - Support a custom remote. ([@marco-c](https://github.com/marco-c))
* [#60](https://github.com/tschaub/gh-pages/pull/60) - Update eslint-config-tschaub to version 4.0.0 🚀 ([@tschaub](https://github.com/tschaub))
* [#57](https://github.com/tschaub/gh-pages/pull/57) - Update eslint to version 2.2.0 🚀 ([@tschaub](https://github.com/tschaub))
* [#59](https://github.com/tschaub/gh-pages/pull/59) - Allow an array of src patterns to be provided. ([@tschaub](https://github.com/tschaub))
* [#54](https://github.com/tschaub/gh-pages/pull/54) - Ugrade ESLint and config. ([@tschaub](https://github.com/tschaub))
## v0.10.0

@@ -2,0 +11,0 @@

5

lib/git.js

@@ -102,3 +102,4 @@ var cp = require('child_process');

return fs.makeTree(path.dirname(path.resolve(dir))).then(function() {
var args = ['clone', repo, dir, '--branch', branch, '--single-branch'];
var args = ['clone', repo, dir, '--branch', branch, '--single-branch',
'--origin', options.remote];
if (options.depth) {

@@ -109,3 +110,3 @@ args.push('--depth', options.depth);

// try again without banch options
return spawn(git, ['clone', repo, dir]);
return spawn(git, ['clone', repo, dir, '--origin', options.remote]);
});

@@ -112,0 +113,0 @@ });

14

lib/index.js

@@ -6,3 +6,3 @@ var path = require('path');

var wrench = require('wrench');
var glob = require('glob');
var globby = require('globby');

@@ -33,5 +33,5 @@ var git = require('./git');

return Q.reject(new Error(
'Failed to get remote.origin.url (task must either be run in a ' +
'git repository with a configured origin remote or must be ' +
'configured with the "repo" option).'));
'Failed to get remote.' + remote + '.url (task must either be ' +
'run in a git repository with a configured ' + remote + ' remote ' +
'or must be configured with the "repo" option).'));
});

@@ -44,3 +44,3 @@ }

} else {
return getRemoteUrl(process.cwd(), 'origin');
return getRemoteUrl(process.cwd(), options.remote);
}

@@ -119,3 +119,3 @@ }

var files = glob.sync(options.src, {
var files = globby.sync(options.src, {
cwd: basePath,

@@ -132,3 +132,3 @@ dot: options.dotfiles

var only = glob.sync(options.only, {cwd: basePath});
var only = globby.sync(options.only, {cwd: basePath});

@@ -135,0 +135,0 @@ git.exe(options.git);

{
"name": "gh-pages",
"version": "0.10.0",
"version": "0.11.0",
"description": "Publish to a gh-pages branch on GitHub (or any other branch on any other remote)",

@@ -31,3 +31,3 @@ "keywords": [

"commander": "2.9.0",
"glob": "~7.0.0",
"globby": "^4.0.0",
"graceful-fs": "4.1.2",

@@ -40,4 +40,4 @@ "q": "1.4.1",

"chai": "^3.4.1",
"eslint": "^1.10.3",
"eslint-config-tschaub": "^2.0.0",
"eslint": "2.2.0",
"eslint-config-tschaub": "4.0.0",
"mocha": "^2.3.4"

@@ -44,0 +44,0 @@ },

@@ -38,3 +38,3 @@ # gh-pages

### <a id="optionsbase">`basePath`</a>
### <a id="basepath">`basePath`</a>
* type: `string`

@@ -72,6 +72,6 @@

#### <a id="optionssrc">options.src</a>
* type: `string`
* type: `string|Array<string>`
* default: `'**/*'`
The [minimatch](https://github.com/isaacs/minimatch) pattern used to select which files should be published.
The [minimatch](https://github.com/isaacs/minimatch) pattern or array of patterns used to select which files should be published.

@@ -154,2 +154,20 @@

#### <a id="optionsremote">options.remote</a>
* type: `string`
* default: `'origin'`
The name of the remote you'll be pushing to. The default is your `'origin'` remote, but this can be configured to push to any remote.
Example use of the `remote` option:
```js
/**
* This task pushes to the `gh-pages` branch of of your `upstream` remote.
*/
ghpages.publish(path.join(__dirname, 'build'), {
remote: 'upstream'
}, callback);
```
#### <a id="optionstag">options.tag</a>

@@ -156,0 +174,0 @@ * type: `string`

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc