Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crissdev/wp-down
Download WordPress releases
https://github.com/crissdev/wp-down
Last synced: about 2 months ago
JSON representation
Download WordPress releases
- Host: GitHub
- URL: https://github.com/crissdev/wp-down
- Owner: crissdev
- License: mit
- Created: 2015-01-10T19:49:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-08T18:54:37.000Z (about 9 years ago)
- Last Synced: 2024-04-23T23:37:13.172Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 144 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# wp-down
[![npm version](https://badge.fury.io/js/wp-down.svg)](http://badge.fury.io/js/wp-down)
> Download WordPress releases
## Install
```sh
$ npm install --save wp-down
```## Usage
```js
var wpd = require('wp-down');
wpd(function(err) {
if (err) {
console.log('Download failed', err.message);
}
else {
console.log('Download complete');
}
});
```## CLI
```sh
# Download the latest release and extract it
$ wp-down# Download 4.3.1 release but don't extract contents of the archive
$ wp-down --release=4.3.1 --extract=no# download 4.3.1 release, in zip format and extract the contents of
# the archive in ./wp directory
$ wp-down --release=4.3.1 --extract=yes --format=zip --out=./wp
```## API
wp-down(options, callback)
### Options
Type: `String` or `Object`
When this argument is a String, it specifies which WordPress version to download.
#### options.version
Type: `String`
Default: `Latest version available`
Which WordPress version to download. By default it will be the latest version detected from the latest tag available in
the Github repository https://github.com/WordPress/WordPress/tags.#### options.format
Type: `String`
Default: `zip`
The format of the archive to retrieve. Supported values are: `zip`, `tar.gz`.
#### options.extract
Type: `Boolean`
Default: `true`
When set to true, it will extract the contents of the WordPress release archive.
#### options.dir
Type: `String`
Default: `./wordpress-{version}`
The directory where to extract the WordPress release archive. The value `{version}` may be used to specify
a version based name.### callback(err, files)
Type: `Function`
The callback will return an array of vinyl `files` in files.
## License
MIT © [Cristian Trifan](http://crissdev.com)