├── .gitignore ├── .jshintrc ├── LICENSE.txt ├── README.md ├── gilded-wordpress.php ├── index.js ├── package-lock.json ├── package.json ├── scripts ├── copy-php-plugin.js └── preversion.js └── tasks └── wordpress.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqnull": true, 4 | "eqeqeq": true, 5 | "expr": true, 6 | "latedef": "nofunc", 7 | "noarg": true, 8 | "node": true, 9 | "smarttabs": true, 10 | "trailing": true, 11 | "undef": true 12 | } 13 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright Scott González http://scottgonzalez.com 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # grunt-wordpress 2 | 3 | Grunt plugin for publishing content to WordPress using [Gilded WordPress](https://github.com/scottgonzalez/gilded-wordpress). 4 | 5 | Support this project by [donating on Gratipay](https://gratipay.com/scottgonzalez/). 6 | 7 | 8 | 9 | ## Getting Started 10 | 11 | grunt-wordpress works just like any other [Grunt](http://gruntjs.com/) plugin. See the [Config](#config) section for details on setting up the Grunt tasks. 12 | 13 | Make sure to copy `gilded-wordpress.php` in to your WordPress install as a plugin. 14 | 15 | For most projects, you should only need to specify the `wordpress` config 16 | and use the `wordpress-deploy` task (or its alias `deploy`). 17 | 18 | 19 | 20 | ## Config 21 | 22 | ```javascript 23 | grunt.initConfig({ 24 | wordpress: { 25 | url: "wordpress.dev", 26 | username: "admin", 27 | password: "admin", 28 | dir: "dist" 29 | } 30 | }); 31 | ``` 32 | 33 | * `url`: The URL for the WordPress install. 34 | Can be a full URL, e.g., `http://wordpress.dev:123/some/path` 35 | or as short as just the host name. 36 | If the protocol is `https`, then a secure connection will be used. 37 | * `host` (optional): The actual host to connect to if different from the URL, e.g., when deploying to a local server behind a firewall. 38 | * `username`: WordPress username. 39 | * `password`: WordPress password. 40 | * `dir`: Directory containing posts, taxonomies, and resources. 41 | * See the [Gilded WordPress documentation](https://github.com/scottgonzalez/gilded-wordpress#directory-structure) for details on the directory structure and file formats. 42 | 43 | 44 | 45 | ## Tasks 46 | 47 | ### wordpress-validate 48 | 49 | Walks through the `wordpress.dir` directory and performs various validations, such as: 50 | 51 | * Verifying that XML-RPC is enabled for the WordPress site. 52 | * Verifying that the custom XML-RPC methods for gilded-wordpress are installed. 53 | * Verifying the taxonomies and terms in `taxonomies.json`. 54 | * Verifying that child-parent relationships for posts are valid. 55 | * Verifying data for each post. 56 | 57 | ### wordpress-sync 58 | 59 | Synchronizes everything in `wordpress.dir` to the WordPress site. 60 | This will create/edit/delete terms, posts, and resources. 61 | 62 | *Note: `wordpress-validate` must run prior to `wordpress-sync`.* 63 | 64 | ### wordpress-publish 65 | 66 | Alias task for `wordpress-validate` and `wordpress-sync`. 67 | This is useful if your original source content is already in the proper format, 68 | or if you want to manually verify generated content between your custom build and publishing. 69 | 70 | ### wordpress-deploy 71 | 72 | Alias task for `build-wordpress` and `wordpress-publish`. 73 | This is useful if you are generating content for use with `wordpess-sync`. 74 | Simply create a `build-wordpress` task that populates the `wordpress.dir` directory 75 | and your deployments will be as simple as `grunt wordpress-deploy`. 76 | 77 | ### deploy 78 | 79 | Alias task for `wordpress-deploy`. 80 | Since most projects that use grunt-wordpress only have one deploy target (WordPress), 81 | there is a built-in `deploy` task that just runs `wordpress-deploy`. 82 | If your project has multiple deploy targets, you can simply re-alias the `deploy` task. 83 | 84 | 85 | 86 | ## Using Gilded WordPress 87 | 88 | It's sometimes useful to have direct access to the Gilded WordPress module. You could install Gilded WordPress as a dependency alongside grunt-wordpress, but in order to guarantee that you're loading the same version, grunt-wordpress exposes its own dependency. Simply `require( "grunt-wordpress" )` and you'll get the Gilded WordPress module. 89 | 90 | 91 | 92 | ## Permissive Uploads 93 | 94 | Depending on what resources you're uploading, you may need to change some WordPress settings. See the [Gilded WordPress documentation](https://github.com/scottgonzalez/gilded-wordpress#permissive-uploads) for some settings that might help. 95 | 96 | 97 | 98 | ## License 99 | 100 | Copyright Scott González. Released under the terms of the MIT license. 101 | 102 | --- 103 | 104 | Support this project by [donating on Gratipay](https://gratipay.com/scottgonzalez/). 105 | -------------------------------------------------------------------------------- /gilded-wordpress.php: -------------------------------------------------------------------------------- 1 | escape( $args ); 19 | 20 | // Authenticate 21 | $blog_id = $args[0]; 22 | $username = $args[1]; 23 | $password = $args[2]; 24 | 25 | // We require authentication so that we can ensure that the username 26 | // and password provided will work for other methods. 27 | if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) ) { 28 | return $wp_xmlrpc_server->error; 29 | } 30 | 31 | return GW_VERSION; 32 | } 33 | 34 | function gw_get_post_paths( $post_type = "" ) { 35 | $results = array(); 36 | $query = new WP_Query( array( 37 | 'post_type' => $post_type, 38 | 'post_status' => 'publish', 39 | 'posts_per_page' => -1, 40 | 'update_post_term_cache' => false, 41 | ) ); 42 | foreach ( $query->posts as $post ) { 43 | $results[ $post->post_type . '/' . get_page_uri( $post->ID ) ] = array( 44 | 'id' => $post->ID, 45 | 'checksum' => get_post_meta( $post->ID, 'gwcs', true ), 46 | ); 47 | } 48 | 49 | return $results; 50 | } 51 | 52 | 53 | function gw_get_resources() { 54 | $filename = GW_RESOURCE_DIR . "/__gw.json"; 55 | if ( !file_exists( $filename ) ) { 56 | return array(); 57 | } 58 | return json_decode( file_get_contents( $filename ), true ); 59 | } 60 | 61 | function gw_set_resources( $resources ) { 62 | file_put_contents( GW_RESOURCE_DIR . "/__gw.json", json_encode( $resources ) ); 63 | } 64 | 65 | function gw_add_resource( $args ) { 66 | global $wp_xmlrpc_server; 67 | $wp_xmlrpc_server->escape( $args ); 68 | 69 | // Authenticate 70 | $blog_id = $args[0]; 71 | $username = $args[1]; 72 | $password = $args[2]; 73 | 74 | if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) ) { 75 | return $wp_xmlrpc_server->error; 76 | } 77 | 78 | // Verify path and decode file contents 79 | $path = $args[3]; 80 | if ( false !== strpos( $path, ".." ) ) { 81 | return new IXR_ERROR( 500, "Invalid path." ); 82 | } 83 | $bits = $args[4]; 84 | $checksum = md5( $bits ); 85 | $bits = base64_decode( $bits ); 86 | 87 | // Create a temp file using built-in upload functionality 88 | $info = pathinfo( $path ); 89 | $ext = !empty($info['extension']) ? '.' . $info['extension'] : ''; 90 | $upload = wp_upload_bits( "gw-resource" . $ext, null, $bits ); 91 | if ( !empty( $upload['error'] ) ) { 92 | return new IXR_Error( 500, $upload['error'] ); 93 | } 94 | 95 | // Move the file to the gw-resources directory 96 | $new_file = GW_RESOURCE_DIR . "/$path"; 97 | if ( ! wp_mkdir_p( dirname( $new_file ) ) ) { 98 | $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), dirname( $new_file ) ); 99 | return new IXR_Error( 500, $message ); 100 | } 101 | rename( $upload['file'], $new_file ); 102 | clearstatcache(); 103 | 104 | // Update resource list 105 | $resources = gw_get_resources(); 106 | $resources[ $path ] = $checksum; 107 | gw_set_resources( $resources ); 108 | 109 | return $checksum; 110 | } 111 | 112 | function gw_delete_resource( $args ) { 113 | global $wp_xmlrpc_server; 114 | $wp_xmlrpc_server->escape( $args ); 115 | 116 | // Authenticate 117 | $blog_id = $args[0]; 118 | $username = $args[1]; 119 | $password = $args[2]; 120 | 121 | if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) ) { 122 | return $wp_xmlrpc_server->error; 123 | } 124 | 125 | // Verify path 126 | $path = $args[3]; 127 | if ( false !== strpos( $path, ".." ) ) { 128 | return new IXR_ERROR( 500, "Invalid path." ); 129 | } 130 | 131 | // Delete resource 132 | $old_file = GW_RESOURCE_DIR . "/$path"; 133 | if ( file_exists( $old_file ) ) { 134 | unlink( $old_file ); 135 | } 136 | 137 | // Update resource list 138 | $resources = gw_get_resources(); 139 | $checksum = empty( $resources[ $path ] ) ? null : $resources[ $path ]; 140 | unset( $resources[ $path ] ); 141 | gw_set_resources( $resources ); 142 | 143 | return $checksum; 144 | } 145 | 146 | function gw_register_xmlrpc_methods( $methods ) { 147 | $methods['gw.getVersion'] = 'gw_get_version'; 148 | $methods['gw.getPostPaths'] = 'gw_get_post_paths'; 149 | $methods['gw.getResources'] = 'gw_get_resources'; 150 | $methods['gw.addResource'] = 'gw_add_resource'; 151 | $methods['gw.deleteResource'] = 'gw_delete_resource'; 152 | return $methods; 153 | } 154 | 155 | add_filter( 'xmlrpc_methods', 'gw_register_xmlrpc_methods' ); 156 | 157 | 158 | 159 | function gw_sanitize_title_with_dashes( $title, $raw_title = '', $context = 'display' ) { 160 | // Special case during the install process. 161 | if ( 'Uncategorized' == $raw_title ) 162 | return 'uncategorized'; 163 | 164 | $title = strip_tags($title); 165 | // Preserve escaped octets. 166 | $title = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title ); 167 | // Remove percent signs that are not part of an octet. 168 | $title = str_replace( '%', '', $title ); 169 | // Restore octets. 170 | $title = preg_replace( '|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title ); 171 | 172 | // CHANGE: Don't lowercase 173 | if ( seems_utf8( $title ) ) { 174 | $title = utf8_uri_encode( $title, 200 ); 175 | } 176 | 177 | // CHANGE: Don't lowercase and don't remove dots 178 | $title = preg_replace( '/&.+?;/', '', $title ); // kill entities 179 | 180 | if ( 'save' == $context ) { 181 | // Convert nbsp, ndash and mdash to hyphens 182 | $title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title ); 183 | 184 | // Strip these characters entirely 185 | $title = str_replace( array( 186 | // iexcl and iquest 187 | '%c2%a1', '%c2%bf', 188 | // angle quotes 189 | '%c2%ab', '%c2%bb', '%e2%80%b9', '%e2%80%ba', 190 | // curly quotes 191 | '%e2%80%98', '%e2%80%99', '%e2%80%9c', '%e2%80%9d', 192 | '%e2%80%9a', '%e2%80%9b', '%e2%80%9e', '%e2%80%9f', 193 | // copy, reg, deg, hellip and trade 194 | '%c2%a9', '%c2%ae', '%c2%b0', '%e2%80%a6', '%e2%84%a2', 195 | ), '', $title ); 196 | } 197 | 198 | // CHANGE: Allow dots and case-insensitive 199 | $title = preg_replace( '/[^%a-z0-9 _.-]/i', '', $title ); 200 | $title = preg_replace( '/\s+/', '-', $title ); 201 | $title = preg_replace( '|-+|', '-', $title ); 202 | $title = trim( $title, '-' ); 203 | 204 | return $title; 205 | } 206 | 207 | remove_filter( 'sanitize_title', 'sanitize_title_with_dashes', 10, 3 ); 208 | add_filter( 'sanitize_title', 'gw_sanitize_title_with_dashes', 10, 3 ); 209 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = require( "gilded-wordpress" ); 2 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grunt-wordpress", 3 | "version": "2.1.4", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "grunt-wordpress", 9 | "version": "2.1.4", 10 | "license": "MIT", 11 | "dependencies": { 12 | "gilded-wordpress": "1.0.6" 13 | }, 14 | "devDependencies": { 15 | "jshint": "2.8.0" 16 | } 17 | }, 18 | "node_modules/async": { 19 | "version": "0.9.2", 20 | "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", 21 | "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" 22 | }, 23 | "node_modules/balanced-match": { 24 | "version": "1.0.2", 25 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 26 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 27 | }, 28 | "node_modules/brace-expansion": { 29 | "version": "1.1.11", 30 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 31 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 32 | "dependencies": { 33 | "balanced-match": "^1.0.0", 34 | "concat-map": "0.0.1" 35 | } 36 | }, 37 | "node_modules/cli": { 38 | "version": "0.6.6", 39 | "resolved": "https://registry.npmjs.org/cli/-/cli-0.6.6.tgz", 40 | "integrity": "sha512-4H6IzYk78R+VBeJ3fH3VQejcQRkGPR+kMjA9n30srEN+YVMPJLHfoQDtLquIzcLnfrlUrVA8qSQRB9fdgWpUBw==", 41 | "dev": true, 42 | "dependencies": { 43 | "exit": "0.1.2", 44 | "glob": "~ 3.2.1" 45 | }, 46 | "engines": { 47 | "node": ">=0.2.5" 48 | } 49 | }, 50 | "node_modules/cli/node_modules/glob": { 51 | "version": "3.2.11", 52 | "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", 53 | "integrity": "sha512-hVb0zwEZwC1FXSKRPFTeOtN7AArJcJlI6ULGLtrstaswKNlrTJqAA+1lYlSUop4vjA423xlBzqfVS3iWGlqJ+g==", 54 | "dev": true, 55 | "dependencies": { 56 | "inherits": "2", 57 | "minimatch": "0.3" 58 | }, 59 | "engines": { 60 | "node": "*" 61 | } 62 | }, 63 | "node_modules/cli/node_modules/minimatch": { 64 | "version": "0.3.0", 65 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", 66 | "integrity": "sha512-WFX1jI1AaxNTZVOHLBVazwTWKaQjoykSzCBNXB72vDTCzopQGtyP91tKdFK5cv1+qMwPyiTu1HqUriqplI8pcA==", 67 | "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", 68 | "dev": true, 69 | "dependencies": { 70 | "lru-cache": "2", 71 | "sigmund": "~1.0.0" 72 | }, 73 | "engines": { 74 | "node": "*" 75 | } 76 | }, 77 | "node_modules/concat-map": { 78 | "version": "0.0.1", 79 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 80 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 81 | }, 82 | "node_modules/console-browserify": { 83 | "version": "1.1.0", 84 | "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", 85 | "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", 86 | "dev": true, 87 | "dependencies": { 88 | "date-now": "^0.1.4" 89 | } 90 | }, 91 | "node_modules/core-util-is": { 92 | "version": "1.0.3", 93 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 94 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", 95 | "dev": true 96 | }, 97 | "node_modules/date-now": { 98 | "version": "0.1.4", 99 | "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", 100 | "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", 101 | "dev": true 102 | }, 103 | "node_modules/dom-serializer": { 104 | "version": "0.2.2", 105 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", 106 | "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", 107 | "dev": true, 108 | "dependencies": { 109 | "domelementtype": "^2.0.1", 110 | "entities": "^2.0.0" 111 | } 112 | }, 113 | "node_modules/dom-serializer/node_modules/domelementtype": { 114 | "version": "2.3.0", 115 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", 116 | "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", 117 | "dev": true, 118 | "funding": [ 119 | { 120 | "type": "github", 121 | "url": "https://github.com/sponsors/fb55" 122 | } 123 | ] 124 | }, 125 | "node_modules/dom-serializer/node_modules/entities": { 126 | "version": "2.2.0", 127 | "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", 128 | "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", 129 | "dev": true, 130 | "funding": { 131 | "url": "https://github.com/fb55/entities?sponsor=1" 132 | } 133 | }, 134 | "node_modules/domelementtype": { 135 | "version": "1.3.1", 136 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", 137 | "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", 138 | "dev": true 139 | }, 140 | "node_modules/domhandler": { 141 | "version": "2.3.0", 142 | "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", 143 | "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", 144 | "dev": true, 145 | "dependencies": { 146 | "domelementtype": "1" 147 | } 148 | }, 149 | "node_modules/domutils": { 150 | "version": "1.5.1", 151 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", 152 | "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", 153 | "dev": true, 154 | "dependencies": { 155 | "dom-serializer": "0", 156 | "domelementtype": "1" 157 | } 158 | }, 159 | "node_modules/entities": { 160 | "version": "1.0.0", 161 | "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", 162 | "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", 163 | "dev": true 164 | }, 165 | "node_modules/exit": { 166 | "version": "0.1.2", 167 | "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", 168 | "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", 169 | "dev": true, 170 | "engines": { 171 | "node": ">= 0.8.0" 172 | } 173 | }, 174 | "node_modules/gilded-wordpress": { 175 | "version": "1.0.6", 176 | "resolved": "https://registry.npmjs.org/gilded-wordpress/-/gilded-wordpress-1.0.6.tgz", 177 | "integrity": "sha512-xL03MCIpMfIgwsnSA2akCqRZ35Odfgp5xi6xXIl494LA4MwY3VGw844X+AlSHKnIezL/0aHQQNOevWtmpfvzTw==", 178 | "dependencies": { 179 | "async": "^0.9.0", 180 | "glob": "^4.0.6", 181 | "wordpress": "^1.4.2" 182 | } 183 | }, 184 | "node_modules/glob": { 185 | "version": "4.5.3", 186 | "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", 187 | "integrity": "sha512-I0rTWUKSZKxPSIAIaqhSXTM/DiII6wame+rEC3cFA5Lqmr9YmdL7z6Hj9+bdWtTvoY1Su4/OiMLmb37Y7JzvJQ==", 188 | "dependencies": { 189 | "inflight": "^1.0.4", 190 | "inherits": "2", 191 | "minimatch": "^2.0.1", 192 | "once": "^1.3.0" 193 | }, 194 | "engines": { 195 | "node": "*" 196 | } 197 | }, 198 | "node_modules/htmlparser2": { 199 | "version": "3.8.3", 200 | "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", 201 | "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", 202 | "dev": true, 203 | "dependencies": { 204 | "domelementtype": "1", 205 | "domhandler": "2.3", 206 | "domutils": "1.5", 207 | "entities": "1.0", 208 | "readable-stream": "1.1" 209 | } 210 | }, 211 | "node_modules/inflight": { 212 | "version": "1.0.6", 213 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 214 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 215 | "dependencies": { 216 | "once": "^1.3.0", 217 | "wrappy": "1" 218 | } 219 | }, 220 | "node_modules/inherits": { 221 | "version": "2.0.4", 222 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 223 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 224 | }, 225 | "node_modules/isarray": { 226 | "version": "0.0.1", 227 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", 228 | "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", 229 | "dev": true 230 | }, 231 | "node_modules/jshint": { 232 | "version": "2.8.0", 233 | "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.8.0.tgz", 234 | "integrity": "sha512-IJJlrjPQU0fBkuV2Sgm4OKyHH5cFx2QToQgpkcyJcrF8gjG2AVpVnRqPQ3JrmlTQPiVlp9KAKfGezHk3mr7VJw==", 235 | "dev": true, 236 | "dependencies": { 237 | "cli": "0.6.x", 238 | "console-browserify": "1.1.x", 239 | "exit": "0.1.x", 240 | "htmlparser2": "3.8.x", 241 | "lodash": "3.7.x", 242 | "minimatch": "2.0.x", 243 | "shelljs": "0.3.x", 244 | "strip-json-comments": "1.0.x" 245 | }, 246 | "bin": { 247 | "jshint": "bin/jshint" 248 | } 249 | }, 250 | "node_modules/lodash": { 251 | "version": "3.7.0", 252 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz", 253 | "integrity": "sha512-73GDDlioRJOCHV8N9gnBEpjdWI34+e9AvMnS4qdqdMfl8/yH/dJP1tfuqUFccZ/deZQlHuJiRSuKXjKIfDwBOg==", 254 | "dev": true 255 | }, 256 | "node_modules/lru-cache": { 257 | "version": "2.7.3", 258 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", 259 | "integrity": "sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ==", 260 | "dev": true 261 | }, 262 | "node_modules/minimatch": { 263 | "version": "2.0.10", 264 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", 265 | "integrity": "sha512-jQo6o1qSVLEWaw3l+bwYA2X0uLuK2KjNh2wjgO7Q/9UJnXr1Q3yQKR8BI0/Bt/rPg75e6SMW4hW/6cBHVTZUjA==", 266 | "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", 267 | "dependencies": { 268 | "brace-expansion": "^1.0.0" 269 | }, 270 | "engines": { 271 | "node": "*" 272 | } 273 | }, 274 | "node_modules/once": { 275 | "version": "1.4.0", 276 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 277 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 278 | "dependencies": { 279 | "wrappy": "1" 280 | } 281 | }, 282 | "node_modules/readable-stream": { 283 | "version": "1.1.14", 284 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", 285 | "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", 286 | "dev": true, 287 | "dependencies": { 288 | "core-util-is": "~1.0.0", 289 | "inherits": "~2.0.1", 290 | "isarray": "0.0.1", 291 | "string_decoder": "~0.10.x" 292 | } 293 | }, 294 | "node_modules/sax": { 295 | "version": "1.2.4", 296 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 297 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 298 | }, 299 | "node_modules/shelljs": { 300 | "version": "0.3.0", 301 | "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", 302 | "integrity": "sha512-Ny0KN4dyT8ZSCE0frtcbAJGoM/HTArpyPkeli1/00aYfm0sbD/Gk/4x7N2DP9QKGpBsiQH7n6rpm1L79RtviEQ==", 303 | "dev": true, 304 | "bin": { 305 | "shjs": "bin/shjs" 306 | }, 307 | "engines": { 308 | "node": ">=0.8.0" 309 | } 310 | }, 311 | "node_modules/sigmund": { 312 | "version": "1.0.1", 313 | "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", 314 | "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", 315 | "dev": true 316 | }, 317 | "node_modules/string_decoder": { 318 | "version": "0.10.31", 319 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", 320 | "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", 321 | "dev": true 322 | }, 323 | "node_modules/strip-json-comments": { 324 | "version": "1.0.4", 325 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", 326 | "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", 327 | "dev": true, 328 | "bin": { 329 | "strip-json-comments": "cli.js" 330 | }, 331 | "engines": { 332 | "node": ">=0.8.0" 333 | } 334 | }, 335 | "node_modules/wordpress": { 336 | "version": "1.4.2", 337 | "resolved": "https://registry.npmjs.org/wordpress/-/wordpress-1.4.2.tgz", 338 | "integrity": "sha512-T+o+Af6pK7mhTz/rJEZk4PpSIyRMVhx6vZm6UsmrnlL8pVudhu1gWzn1n3wZXlcEZQz7I0AOkEvPQ5hu++L+qg==", 339 | "dependencies": { 340 | "xmlrpc": "1.3.2" 341 | } 342 | }, 343 | "node_modules/wrappy": { 344 | "version": "1.0.2", 345 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 346 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" 347 | }, 348 | "node_modules/xmlbuilder": { 349 | "version": "8.2.2", 350 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", 351 | "integrity": "sha512-eKRAFz04jghooy8muekqzo8uCSVNeyRedbuJrp0fovbLIi7wlsYtdUn3vBAAPq2Y3/0xMz2WMEUQ8yhVVO9Stw==", 352 | "engines": { 353 | "node": ">=4.0" 354 | } 355 | }, 356 | "node_modules/xmlrpc": { 357 | "version": "1.3.2", 358 | "resolved": "https://registry.npmjs.org/xmlrpc/-/xmlrpc-1.3.2.tgz", 359 | "integrity": "sha512-jQf5gbrP6wvzN71fgkcPPkF4bF/Wyovd7Xdff8d6/ihxYmgETQYSuTc+Hl+tsh/jmgPLro/Aro48LMFlIyEKKQ==", 360 | "dependencies": { 361 | "sax": "1.2.x", 362 | "xmlbuilder": "8.2.x" 363 | }, 364 | "engines": { 365 | "node": ">=0.8", 366 | "npm": ">=1.0.0" 367 | } 368 | } 369 | }, 370 | "dependencies": { 371 | "async": { 372 | "version": "0.9.2", 373 | "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", 374 | "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" 375 | }, 376 | "balanced-match": { 377 | "version": "1.0.2", 378 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 379 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 380 | }, 381 | "brace-expansion": { 382 | "version": "1.1.11", 383 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 384 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 385 | "requires": { 386 | "balanced-match": "^1.0.0", 387 | "concat-map": "0.0.1" 388 | } 389 | }, 390 | "cli": { 391 | "version": "0.6.6", 392 | "resolved": "https://registry.npmjs.org/cli/-/cli-0.6.6.tgz", 393 | "integrity": "sha512-4H6IzYk78R+VBeJ3fH3VQejcQRkGPR+kMjA9n30srEN+YVMPJLHfoQDtLquIzcLnfrlUrVA8qSQRB9fdgWpUBw==", 394 | "dev": true, 395 | "requires": { 396 | "exit": "0.1.2", 397 | "glob": "~ 3.2.1" 398 | }, 399 | "dependencies": { 400 | "glob": { 401 | "version": "3.2.11", 402 | "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", 403 | "integrity": "sha512-hVb0zwEZwC1FXSKRPFTeOtN7AArJcJlI6ULGLtrstaswKNlrTJqAA+1lYlSUop4vjA423xlBzqfVS3iWGlqJ+g==", 404 | "dev": true, 405 | "requires": { 406 | "inherits": "2", 407 | "minimatch": "0.3" 408 | } 409 | }, 410 | "minimatch": { 411 | "version": "0.3.0", 412 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", 413 | "integrity": "sha512-WFX1jI1AaxNTZVOHLBVazwTWKaQjoykSzCBNXB72vDTCzopQGtyP91tKdFK5cv1+qMwPyiTu1HqUriqplI8pcA==", 414 | "dev": true, 415 | "requires": { 416 | "lru-cache": "2", 417 | "sigmund": "~1.0.0" 418 | } 419 | } 420 | } 421 | }, 422 | "concat-map": { 423 | "version": "0.0.1", 424 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 425 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 426 | }, 427 | "console-browserify": { 428 | "version": "1.1.0", 429 | "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", 430 | "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", 431 | "dev": true, 432 | "requires": { 433 | "date-now": "^0.1.4" 434 | } 435 | }, 436 | "core-util-is": { 437 | "version": "1.0.3", 438 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 439 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", 440 | "dev": true 441 | }, 442 | "date-now": { 443 | "version": "0.1.4", 444 | "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", 445 | "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", 446 | "dev": true 447 | }, 448 | "dom-serializer": { 449 | "version": "0.2.2", 450 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", 451 | "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", 452 | "dev": true, 453 | "requires": { 454 | "domelementtype": "^2.0.1", 455 | "entities": "^2.0.0" 456 | }, 457 | "dependencies": { 458 | "domelementtype": { 459 | "version": "2.3.0", 460 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", 461 | "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", 462 | "dev": true 463 | }, 464 | "entities": { 465 | "version": "2.2.0", 466 | "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", 467 | "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", 468 | "dev": true 469 | } 470 | } 471 | }, 472 | "domelementtype": { 473 | "version": "1.3.1", 474 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", 475 | "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", 476 | "dev": true 477 | }, 478 | "domhandler": { 479 | "version": "2.3.0", 480 | "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", 481 | "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", 482 | "dev": true, 483 | "requires": { 484 | "domelementtype": "1" 485 | } 486 | }, 487 | "domutils": { 488 | "version": "1.5.1", 489 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", 490 | "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", 491 | "dev": true, 492 | "requires": { 493 | "dom-serializer": "0", 494 | "domelementtype": "1" 495 | } 496 | }, 497 | "entities": { 498 | "version": "1.0.0", 499 | "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", 500 | "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", 501 | "dev": true 502 | }, 503 | "exit": { 504 | "version": "0.1.2", 505 | "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", 506 | "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", 507 | "dev": true 508 | }, 509 | "gilded-wordpress": { 510 | "version": "1.0.6", 511 | "resolved": "https://registry.npmjs.org/gilded-wordpress/-/gilded-wordpress-1.0.6.tgz", 512 | "integrity": "sha512-xL03MCIpMfIgwsnSA2akCqRZ35Odfgp5xi6xXIl494LA4MwY3VGw844X+AlSHKnIezL/0aHQQNOevWtmpfvzTw==", 513 | "requires": { 514 | "async": "^0.9.0", 515 | "glob": "^4.0.6", 516 | "wordpress": "^1.4.2" 517 | } 518 | }, 519 | "glob": { 520 | "version": "4.5.3", 521 | "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", 522 | "integrity": "sha512-I0rTWUKSZKxPSIAIaqhSXTM/DiII6wame+rEC3cFA5Lqmr9YmdL7z6Hj9+bdWtTvoY1Su4/OiMLmb37Y7JzvJQ==", 523 | "requires": { 524 | "inflight": "^1.0.4", 525 | "inherits": "2", 526 | "minimatch": "^2.0.1", 527 | "once": "^1.3.0" 528 | } 529 | }, 530 | "htmlparser2": { 531 | "version": "3.8.3", 532 | "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", 533 | "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", 534 | "dev": true, 535 | "requires": { 536 | "domelementtype": "1", 537 | "domhandler": "2.3", 538 | "domutils": "1.5", 539 | "entities": "1.0", 540 | "readable-stream": "1.1" 541 | } 542 | }, 543 | "inflight": { 544 | "version": "1.0.6", 545 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 546 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 547 | "requires": { 548 | "once": "^1.3.0", 549 | "wrappy": "1" 550 | } 551 | }, 552 | "inherits": { 553 | "version": "2.0.4", 554 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 555 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 556 | }, 557 | "isarray": { 558 | "version": "0.0.1", 559 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", 560 | "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", 561 | "dev": true 562 | }, 563 | "jshint": { 564 | "version": "2.8.0", 565 | "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.8.0.tgz", 566 | "integrity": "sha512-IJJlrjPQU0fBkuV2Sgm4OKyHH5cFx2QToQgpkcyJcrF8gjG2AVpVnRqPQ3JrmlTQPiVlp9KAKfGezHk3mr7VJw==", 567 | "dev": true, 568 | "requires": { 569 | "cli": "0.6.x", 570 | "console-browserify": "1.1.x", 571 | "exit": "0.1.x", 572 | "htmlparser2": "3.8.x", 573 | "lodash": "3.7.x", 574 | "minimatch": "2.0.x", 575 | "shelljs": "0.3.x", 576 | "strip-json-comments": "1.0.x" 577 | } 578 | }, 579 | "lodash": { 580 | "version": "3.7.0", 581 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz", 582 | "integrity": "sha512-73GDDlioRJOCHV8N9gnBEpjdWI34+e9AvMnS4qdqdMfl8/yH/dJP1tfuqUFccZ/deZQlHuJiRSuKXjKIfDwBOg==", 583 | "dev": true 584 | }, 585 | "lru-cache": { 586 | "version": "2.7.3", 587 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", 588 | "integrity": "sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ==", 589 | "dev": true 590 | }, 591 | "minimatch": { 592 | "version": "2.0.10", 593 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", 594 | "integrity": "sha512-jQo6o1qSVLEWaw3l+bwYA2X0uLuK2KjNh2wjgO7Q/9UJnXr1Q3yQKR8BI0/Bt/rPg75e6SMW4hW/6cBHVTZUjA==", 595 | "requires": { 596 | "brace-expansion": "^1.0.0" 597 | } 598 | }, 599 | "once": { 600 | "version": "1.4.0", 601 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 602 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 603 | "requires": { 604 | "wrappy": "1" 605 | } 606 | }, 607 | "readable-stream": { 608 | "version": "1.1.14", 609 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", 610 | "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", 611 | "dev": true, 612 | "requires": { 613 | "core-util-is": "~1.0.0", 614 | "inherits": "~2.0.1", 615 | "isarray": "0.0.1", 616 | "string_decoder": "~0.10.x" 617 | } 618 | }, 619 | "sax": { 620 | "version": "1.2.4", 621 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 622 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 623 | }, 624 | "shelljs": { 625 | "version": "0.3.0", 626 | "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", 627 | "integrity": "sha512-Ny0KN4dyT8ZSCE0frtcbAJGoM/HTArpyPkeli1/00aYfm0sbD/Gk/4x7N2DP9QKGpBsiQH7n6rpm1L79RtviEQ==", 628 | "dev": true 629 | }, 630 | "sigmund": { 631 | "version": "1.0.1", 632 | "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", 633 | "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", 634 | "dev": true 635 | }, 636 | "string_decoder": { 637 | "version": "0.10.31", 638 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", 639 | "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", 640 | "dev": true 641 | }, 642 | "strip-json-comments": { 643 | "version": "1.0.4", 644 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", 645 | "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", 646 | "dev": true 647 | }, 648 | "wordpress": { 649 | "version": "1.4.2", 650 | "resolved": "https://registry.npmjs.org/wordpress/-/wordpress-1.4.2.tgz", 651 | "integrity": "sha512-T+o+Af6pK7mhTz/rJEZk4PpSIyRMVhx6vZm6UsmrnlL8pVudhu1gWzn1n3wZXlcEZQz7I0AOkEvPQ5hu++L+qg==", 652 | "requires": { 653 | "xmlrpc": "1.3.2" 654 | } 655 | }, 656 | "wrappy": { 657 | "version": "1.0.2", 658 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 659 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" 660 | }, 661 | "xmlbuilder": { 662 | "version": "8.2.2", 663 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", 664 | "integrity": "sha512-eKRAFz04jghooy8muekqzo8uCSVNeyRedbuJrp0fovbLIi7wlsYtdUn3vBAAPq2Y3/0xMz2WMEUQ8yhVVO9Stw==" 665 | }, 666 | "xmlrpc": { 667 | "version": "1.3.2", 668 | "resolved": "https://registry.npmjs.org/xmlrpc/-/xmlrpc-1.3.2.tgz", 669 | "integrity": "sha512-jQf5gbrP6wvzN71fgkcPPkF4bF/Wyovd7Xdff8d6/ihxYmgETQYSuTc+Hl+tsh/jmgPLro/Aro48LMFlIyEKKQ==", 670 | "requires": { 671 | "sax": "1.2.x", 672 | "xmlbuilder": "8.2.x" 673 | } 674 | } 675 | } 676 | } 677 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grunt-wordpress", 3 | "description": "Grunt plugin for publishing content to WordPress", 4 | "version": "2.1.4", 5 | "homepage": "https://github.com/scottgonzalez/grunt-wordpress", 6 | "author": { 7 | "name": "Scott González", 8 | "email": "scott.gonzalez@gmail.com", 9 | "url": "http://scottgonzalez.com" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git://github.com/scottgonzalez/grunt-wordpress.git" 14 | }, 15 | "bugs": { 16 | "url": "https://github.com/scottgonzalez/grunt-wordpress/issues" 17 | }, 18 | "license": "MIT", 19 | "scripts": { 20 | "copy-php-plugin": "./scripts/copy-php-plugin.js", 21 | "preversion": "./scripts/preversion.js", 22 | "test": "jshint tasks/*" 23 | }, 24 | "dependencies": { 25 | "gilded-wordpress": "1.0.6" 26 | }, 27 | "devDependencies": { 28 | "jshint": "2.8.0" 29 | }, 30 | "keywords": [ 31 | "gruntplugin", 32 | "wordpress" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /scripts/copy-php-plugin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs') 4 | const path = require('path') 5 | const package = require('../package'); 6 | 7 | const definedVersion = package.dependencies['gilded-wordpress']; 8 | const gildedPath = require.resolve('gilded-wordpress/gilded-wordpress.php') 9 | const gruntPath = path.join(__dirname, '../gilded-wordpress.php') 10 | const gildedSource = fs.readFileSync(gildedPath, 'utf8') 11 | 12 | const [ , version] = /GW_VERSION', '([^']+)'/.exec(gildedSource) 13 | 14 | if (version !== definedVersion) { 15 | console.error( 16 | 'The gilded-wordpress dependency is out of date.\n' + 17 | 'Please run `npm install` to install the correct version.' 18 | ) 19 | process.exitCode = 1 20 | return 21 | } 22 | 23 | fs.writeFileSync(gruntPath, gildedSource) 24 | -------------------------------------------------------------------------------- /scripts/preversion.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const fs = require('fs') 4 | const path = require('path') 5 | const package = require('../package'); 6 | 7 | const definedVersion = package.dependencies['gilded-wordpress']; 8 | const gildedPath = require.resolve('gilded-wordpress/gilded-wordpress.php') 9 | const gruntPath = path.join(__dirname, '../gilded-wordpress.php') 10 | const gildedSource = fs.readFileSync(gildedPath, 'utf8') 11 | const gruntSource = fs.readFileSync(gruntPath, 'utf8') 12 | 13 | const [ , version] = /GW_VERSION', '([^']+)'/.exec(gildedSource) 14 | 15 | if (version !== definedVersion) { 16 | console.error( 17 | 'The gilded-wordpress dependency is out of date.\n' + 18 | 'Please run `npm install` to install the correct version.' 19 | ) 20 | process.exitCode = 1 21 | return 22 | } 23 | 24 | if (gruntSource !== gildedSource) { 25 | fs.writeFileSync(gruntPath, gildedSource) 26 | console.error( 27 | 'gilded-wordpress.php is not in sync with the dependency.\n' + 28 | 'The file has been updated automatically.\n' + 29 | 'Please commit the change and restart the release.' 30 | ) 31 | process.exitCode = 1 32 | return 33 | } 34 | -------------------------------------------------------------------------------- /tasks/wordpress.js: -------------------------------------------------------------------------------- 1 | var wordpress = require( "gilded-wordpress" ); 2 | 3 | module.exports = function( grunt ) { 4 | 5 | var client = (function() { 6 | var _client; 7 | 8 | return function() { 9 | if ( !_client ) { 10 | var config = grunt.config( "wordpress" ); 11 | config.verbose = grunt.option( "verbose" ) || false; 12 | 13 | _client = wordpress.createClient( config ); 14 | _client.log = function() { 15 | grunt.log.writeln.apply( grunt.log, arguments ); 16 | }; 17 | _client.logError = function() { 18 | grunt.log.error.apply( grunt.log, arguments ); 19 | }; 20 | } 21 | 22 | return _client; 23 | }; 24 | })(); 25 | 26 | grunt.registerTask( "wordpress-validate", function() { 27 | client().validate( this.async() ); 28 | }); 29 | 30 | grunt.registerTask( "wordpress-sync", function() { 31 | this.requires( "wordpress-validate" ); 32 | client().sync( this.async() ); 33 | }); 34 | 35 | grunt.registerTask( "wordpress-publish", [ "wordpress-validate", "wordpress-sync" ] ); 36 | grunt.registerTask( "wordpress-deploy", [ "build-wordpress", "wordpress-publish" ] ); 37 | grunt.registerTask( "deploy", [ "wordpress-deploy" ] ); 38 | 39 | }; 40 | --------------------------------------------------------------------------------