Skip to content

Commit

Permalink
Create gh-pages branch via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
bignall committed Sep 12, 2016
1 parent a06f7f7 commit d0abdf7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,16 @@ <h2>

</section>


<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-44748521-7");
pageTracker._trackPageview();
} catch(err) {}
</script>

</body>
</html>
6 changes: 3 additions & 3 deletions params.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "Grunt-ncftp-push",
"tagline": "Deploy your files to a FTP server",
"body": "# grunt-ncftp-push [![Build Status](https://travis-ci.org/bignall/grunt-ncftp-push.svg?branch=grunt-ncftp-push-0.1.0)](https://travis-ci.org/bignall/grunt-ncftp-push)\r\n\r\n> Deploy your files to a FTP server <br>\r\n\r\n## Getting Started\r\n### Requirements\r\nGrunt `~0.4.5`<br>\r\n[Ncftp](http://ncftp.com/)\r\n\r\n#### Optional Requirements\r\n\r\nGrunt watch\r\n\r\n### Install\r\n\r\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\r\n\r\n```shell\r\nnpm install grunt-ncftp-push --save-dev\r\n```\r\n\r\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\r\n\r\n```js\r\ngrunt.loadNpmTasks('grunt-ncftp-push');\r\n```\r\n\r\n## Usage\r\n\r\nGrunt-ncftp-push adds two grunt taks you can use.\r\n\r\n### The \"ncftp_push\" task\r\n\r\n#### Overview\r\n\r\nThe `ncftp_push` task pushes all the files given to it to the ftp server. Usually you would use this to upload your entire project or parts of your project to the ftp server at once. \r\n\r\n#### Usage\r\nIn your project's Gruntfile, add a section named `ncftp_push` to the data object passed into `grunt.initConfig()`.\r\n\r\n```js\r\ngrunt.initConfig({\r\n ncftp_push: {\r\n all: {\r\n options: {\r\n dest: 'destination/directory/on/ftp/server'\r\n },\r\n files: [{expand: true, src: ['trunk/*', '!trunk/composer*']}]\r\n }\r\n }\r\n})\r\n```\r\n\r\n#### Options\r\n\r\nAll options are optional but you'll at least want to specify a destination directory\r\notherwise it will go to the root directory of the ftp account.\r\n\r\n##### dest\r\nType: `String`<br>\r\nDefault: `/`<br>\r\nRequired: false\r\n\r\nDestination of where you want your files pushed to, relative to the host.\r\n\r\n##### srcBase\r\nType: `String`<br>\r\nDefault: ``<br>\r\nRequired: false\r\n\r\nBase of your source files relative to the project base that you want trimmed\r\nfrom the file names prior to uploading them to make the filename correct relative\r\nto the dest.\r\n\r\n##### authFile\r\nType: `String`<br>\r\nDefault: `.ftpauth`<br>\r\nRequired: false\r\n\r\nFile to get the destination host and authorization credentials from. Default filename is `.ftpauth`. File should be in the following format:\r\n\r\n```txt\r\nhost my.hostname.com\r\nuser myUsername\r\npass myPassword\r\n```\r\n\r\nNote that spacing is important and lines starting with # and blank lines will be ignored. For more information on this file see the ncftp docs.\r\n\r\n##### redial\r\nType: `Integer`<br>\r\nDefault: 3<br>\r\nRequired: false \r\n\r\nMaximum number of retry attempts\r\n\r\n##### ncftpPath\r\nType: `String`<br>\r\nDefault: ``<br>\r\nRequired: false\r\n\r\nPath to the ncftpput command. `` means that the command can be executed without specifying a path. If a path is used it must contain the trailing slash.\r\n\r\n##### join\r\nType: `String`<br>\r\nDefault: `&&`<br>\r\nRequired: false\r\n\r\nHow to join the commands together when there are multiple files. Options are `&&`, `&`, and `;`. The default is `&&` which means only run the next command if the previous one succeeded. `;` will run the commands sequentially and `&` will run the commands concurrently. Running the commands concurrently is usually not a good idea since most ftp servers have limits on concurrent connections. See the documentation for grunt-shell for more information on these options.\r\n\r\n##### shellOptions\r\nType: `Object`<br>\r\nDefault: {} <br>\r\nRequired: false\r\n\r\nAdditional options to pass to the grunt-shell task. See the documents for grunt-shell for more information on the options that can be included.\r\n\r\n##### debug\r\nType: `Boolean`<br>\r\nDefault: `false`<br>\r\nRequired: false\r\n\r\nEnable debug mode for the ncftpput command to allow for verbose messages. This can be useful if the commands are failing and you can't see why. The entire conversation with the server will be output. See the ncftp documentation for more information.\r\n\r\n##### debugFile\r\nType: `String`<br>\r\nDefault: `stdout`<br>\r\nRequired: false\r\n\r\nFile to send the debug info to if debug is true. The special string `stdout` means it will be sent to the terminal.\r\n\r\n### The \"ncftp_watch\" task\r\n\r\n#### Overview \r\n\r\nThe `ncftp_watch` task is meant to be used with `grunt watch`. It pushes changed files to the server when the `watch` event fires. If one task is already running it will keep track of the changed files and run another task when the current one is finished.\r\n\r\n#### Usage\r\nIn your project's Gruntfile, add a section named `ncftp_watch` to the data object passed into `grunt.initConfig()`. Also add a sub-task to the `watch` task in your grunt config that runs the `ncftp_watch` task.\r\n\r\n```js\r\ngrunt.initConfig({\r\n watch: {\r\n ncftp_watch: {\r\n files: [ 'trunk/**/*', '!trunk/composer*'],\r\n tasks: ['ncftp_watch'],\r\n options: {\r\n atBegin: true,\r\n spawn: false,\r\n debounceDelay: 500\r\n }\r\n }\r\n },\r\n ncftp_watch: {\r\n options: {\r\n dest: 'wp-content/plugins/credit-helper-elite',\r\n srcBase: 'trunk/'\r\n },\r\n files: ['trunk/**', '!trunk/composer*']\r\n }\r\n }\r\n})\r\n```\r\n\r\n#### `ncftp_watch` Options\r\n\r\nThe `ncftp_watch` task can have all the same options as the `ncftp_push` task. These options will be used in configuring an `ncftp_push:watch` task which will be started up as needed. \r\n\r\nThe files given to this task will be used to match against changed files so that only files that match these patterns are uploaded to the server.\r\n\r\n#### `watch` `ncftp_watch` Options\r\n\r\nThe `ncftp_watch` sub-task of the `watch` task is a typical `watch` task. \r\n\r\nYou should include `atBegin: true` so that the `ncftp_watch` command runs when `grunt watch` first starts up. This sets up the watchers to catch the changed files and keep track of whether the `ncftp_push:watch` task is queued, and start it up if there are already changed files (there shouldn't be at this point, so the `ncftp_push:watch` task won't run at this point). If you don't set `atBegin` to true the watchers will start up the first time the `ncftp_watch` task is run, but any changed files that came before that run will not be uploaded. \r\n\r\n`spawn` must be set to false. The `ncftp_watch` task must run in the same process as the `watch` task so that it can capture `watch` events and internal `ncftp_start` and `ncftp_finish` events emmitted by the `ncftp_push` task. \r\n\r\n`debounceDelay` can be set to whatever works for you but the default `500` seems to work well (so it can technically be left off).\r\n\r\nThe `ncftp_watch` task should be your last `watch` task. This way it can capture all changed files from tasks that came before it and run an additional `ncftp_push:watch` task if there are any remaining changed files that haven't been pushed to the server yet when it runs (usually the watchers will have taken care of this so it won't start at this point). \r\n\r\nWhen you make changes to a file that causes changes to other files to be made by other watch tasks you will typically see the `ncftp_push:watch` task run multiple times. This is because the event watcher catches the files and queues up an `ncftp_push:watch` task, then more changed files are caught while that task is waiting to be run, so when that `ncftp_push:watch` task finishes another one is queued. More files may be caught after that task is queued so it can happen again. As long as there are changed files in the queue it will queue another task each time the previous one finishes. \r\n\r\nThis can also be useful to configure livereload to automatically reload your web page when files are changed. Just add `livereload: true` to the options. Check out the `grunt watch` documentation about configuring and using livereload.\r\n\r\n### Usage Examples\r\n\r\n#### Sample .ftpauth file\r\n\r\nThis file's default name is `.ftpauth` and is in the same directory as your `Gruntfile.js`. You should add this file to your `.gitignore` so that it is not uploaded to your git repository or specify another file that is not in your project path.\r\n\r\nThe format of this file is specified by `ncftp` and more documentation on it can be found in the `ncftp` docs. It contains the hostname, username and password for the destination ftp server.\r\n\r\n```txt\r\nhost my.hostname.com\r\nuser myUsername\r\npass myPassword\r\n```\r\n\r\n#### Extras\r\nYou can specify a destination inside your files objects like so:\r\n```js\r\n{expand: true,cwd: 'test',src: ['**/*']},\r\n{expand: true,cwd: 'tasks',src: ['**/*'], dest: 'test/' }\r\n```\r\nThis will allow you to configure where you push your code in case you want to push to a diretory structure that is different from your local one. The dest here <strong>MUST</strong> be relative to the root destination.\r\n\r\nSource files can be individual files or they can be directories. Directories will be pushed recursively so all files and other directories within that directory will be pushed to the destination. So if you want to include an entire directory to upload do it like so:\r\n\r\n```js\r\n{expand: true, src: ['mydirectory']}\r\n```\r\n\r\nThis works only for the `ncftp_push` task. The `ncftp_watch` task can only have one destination since files come from the `watch` events.\r\n\r\n### Notes\r\nThe output from `ncftpput` appears in the terminal twice. I don't believe the commands are being run twice it's just output twice. It has something to do with `grunt-shell`. I welcome any suggestions for how to solve it but for now it will just be there twice.\r\n\r\n## Dependencies\r\nThis plugin uses Sindre Sorhus [`grunt-shell`](https://github.com/sindresorhus/grunt-shell) module.\r\n\r\n## To do\r\nCombine files with the same destination to a single `ncftpput` command.\r\n\r\n## Acknowledgements\r\nThis module was originally based on the `grunt-ftp-push` module by Robert Winterbottom and many of the utility functions are the same or very similar but the task code is now very different.\r\n\r\n## Contributing\r\nFork the repo. Make your changes then submit a pull request.\r\n\r\nPlease add unit tests in the root of the test folder for any new or changed functionality and please try to make sure that `npm test` will pass before submitting a pull request.\r\n\r\nThanks for contributing!\r\n\r\n## Release History\r\n<ul>\r\n<li>2016/09/11 Initial release\r\n</ul>",
"note": "Don't delete this file! It's used internally to help with page regeneration.",
"google": "UA-44748521-7"
}
"google": "UA-44748521-7",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}

0 comments on commit d0abdf7

Please sign in to comment.