├── .editorconfig ├── .gitattributes ├── .gitignore ├── .jshintrc ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── TRIAGING.md ├── bin └── hoodie ├── doc └── cli │ ├── help.install.txt │ ├── help.new.txt │ ├── help.reset.txt │ ├── help.start.txt │ ├── help.txt │ └── help.uninstall.txt ├── lib ├── cli.js ├── cli │ ├── argv.js │ ├── help.js │ ├── install.js │ ├── logo.js │ ├── new.js │ ├── reset.js │ ├── start.js │ ├── uninstall.js │ ├── unknown.js │ ├── util │ │ ├── console.js │ │ └── notifier.js │ └── version.js ├── hoodie.js ├── hoodie │ ├── install.js │ ├── new.js │ ├── reset.js │ ├── start.js │ ├── uninstall.js │ ├── util │ │ ├── command.js │ │ ├── dir.js │ │ ├── git.js │ │ ├── insight.js │ │ ├── packages.js │ │ └── pid.js │ └── version.js └── main.js ├── package.json └── spec ├── cli.spec.js ├── cli ├── help.spec.js ├── install.spec.js ├── new.spec.js ├── reset.spec.js ├── start.spec.js ├── uninstall.spec.js └── unknown.spec.js ├── hoodie.spec.js ├── hoodie ├── install.spec.js ├── new.spec.js ├── reset.spec.js ├── start.spec.js ├── uninstall.spec.js ├── util │ └── dir.spec.js └── version.spec.js ├── integration └── hoodie.js ├── main.spec.js ├── runner.js └── support └── helper.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 2 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | node_modules/ 4 | npm-debug.log 5 | .tmp 6 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "passfail": false, 3 | "maxerr": 200, 4 | "browser": true, 5 | "node": true, 6 | "dojo": false, 7 | "jquery": true, 8 | "devel": true, 9 | "predef": [ 10 | "sinon", 11 | "define", 12 | "require", 13 | "Hoodie", 14 | "it", 15 | "describe", 16 | "expect", 17 | "beforeEach", 18 | "afterEach", 19 | "before", 20 | "after", 21 | "jasmine", 22 | "_and", 23 | "_but", 24 | "_when", 25 | "__bind", 26 | "__extends", 27 | "spyOn", 28 | "Mocks" 29 | ], 30 | "debug": false, 31 | "devel": false, 32 | "strict": false, 33 | "globalstrict": false, 34 | "asi": false, 35 | "laxbreak": false, 36 | "bitwise": true, 37 | "boss": false, 38 | "curly": true, 39 | "eqeqeq": true, 40 | "eqnull": true, 41 | "evil": false, 42 | "expr": true, 43 | "forin": true, 44 | "immed": true, 45 | "latedef": false, 46 | "loopfunc": false, 47 | "noarg": true, 48 | "regexp": false, 49 | "regexdash": false, 50 | "scripturl": false, 51 | "shadow": false, 52 | "supernew": false, 53 | "undef": true, 54 | "newcap": true, 55 | "noempty": true, 56 | "nonew": false, 57 | "nomen": false, 58 | "onevar": false, 59 | "plusplus": false, 60 | "sub": false, 61 | "trailing": true, 62 | "white": false, 63 | "unused": true, 64 | "multistr": true, 65 | "maxdepth": 4, 66 | "indent": 2, 67 | "quotmark": "single", 68 | "trailing": true 69 | } 70 | 71 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | before_script: 2 | - npm install -g grunt-cli 3 | before_deploy: 4 | - grunt before-deploy 5 | after_deploy: 6 | - grunt after-deploy 7 | language: node_js 8 | node_js: 9 | - '0.10' 10 | notifications: 11 | email: false 12 | slack: 13 | secure: XgxXg3pJLkWSk0qCrUm6ADU8suGQPAYa/Y+0u93dyCVU2d9H/3rOj2f1xjQiFU6ya9i/eFwfb83yS71r1OALFQNba6jy41BqLwwVpWHxieWSsXGqcTYaBLo+oNC3sGvl/rOK28n8de2xhqfE0YuEMiToGBWkcC+rFVFQ7Iv83pU= 14 | env: 15 | global: 16 | - secure: EAAejPpw+v+ooM5HQdRbQTSW85aAyKB51ADc30GnpD2TP4Cw8RgWHkYqEFm47X65b9UeZLp5CwzqWk9+QvTg09jloowvrLPCCEE+VznKx10Sb/chd0y9Dcg8L9vEUeWC2WKsL+xVMfsGyu3rILWWgvK5S3RH/C2n44X4ADa1doc= 17 | deploy: 18 | provider: npm 19 | email: stephan@thehoodiefirm.com 20 | on: 21 | all_branches: true 22 | tags: true 23 | api_key: 24 | secure: BKgTHGK2rBR5tWZ/7VSlyi+t0ttmFUyHbFv8t6pAMuvHC/TdZWQTGddosNsYLO5njTj9z4OHVz+/B8ESKcGHKAVjYPwdGSIMTgs8xXcG8FksTrKfwhTxckgYdPu2SghVkjczbJ3Frmn2KXxHWLpFepn52IIpyxTwUVw3VdGCTcg= 25 | sudo: false 26 | cache: 27 | directories: 28 | - node_modules 29 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ### 0.6.3 (2014-11-07) 3 | 4 | 5 | #### Bug Fixes 6 | 7 | * **new:** get registry url via config api ([b8ef5485](https://github.com/hoodiehq/hoodie-cli/commit/b8ef54858a646329461f1380c1d0e690890451c6), closes [#151](https://github.com/hoodiehq/hoodie-cli/issues/151)) 8 | 9 | 10 | 11 | ### 0.6.2 (2014-10-21) 12 | 13 | 14 | #### Bug Fixes 15 | 16 | * **new:** 17 | * allow to install specific template version ([e353c4ee](https://github.com/hoodiehq/hoodie-cli/commit/e353c4eecbe856ca578373b8026041b9f7338a7f)) 18 | * correct error handling for unpublished templates ([b123e5c3](https://github.com/hoodiehq/hoodie-cli/commit/b123e5c3c99ed041f43510f9f03eec97b1603800), closes [#149](https://github.com/hoodiehq/hoodie-cli/issues/149)) 19 | 20 | 21 | 22 | ### 0.6.1 (2014-09-08) 23 | 24 | 25 | #### Bug Fixes 26 | 27 | * **new:** install template from cache if possible ([383305f5](https://github.com/hoodiehq/hoodie-cli/commit/383305f54c7162b0ce65b3ca5ed3b0194860be97)) 28 | 29 | 30 | 31 | ## 0.6.0 (2014-08-07) 32 | 33 | 34 | #### Bug Fixes 35 | 36 | * **tracking:** 37 | * fix syntax err ([8edca8f1](https://github.com/hoodiehq/hoodie-cli/commit/8edca8f1c8cc81447a99b0ec410ac12267f3fc5b)) 38 | * only set tracking code in non-ci env ([7a6bf73d](https://github.com/hoodiehq/hoodie-cli/commit/7a6bf73d85bc76e7e01b49437a220481eb84d559)) 39 | 40 | 41 | #### Features 42 | 43 | * **analytics:** adds yeoman insights module ([48fb8903](https://github.com/hoodiehq/hoodie-cli/commit/48fb8903f0f6731fc994657dd2c0e3b73eb05134)) 44 | 45 | 46 | 47 | ### 0.5.6 (2014-08-04) 48 | 49 | 50 | 51 | ### 0.5.5 (2014-08-01) 52 | 53 | 54 | #### Bug Fixes 55 | 56 | * **new:** 57 | * log npm error messages ([d64cfc9b](https://github.com/hoodiehq/hoodie-cli/commit/d64cfc9b49530a4cf173197e89a7d5abffa13da8)) 58 | * use npm api rather than cli to fetch template ([51736586](https://github.com/hoodiehq/hoodie-cli/commit/51736586ed6127ddd1dd3331184f9593e5ea27b5)) 59 | 60 | 61 | 62 | ### 0.5.4 (2014-07-31) 63 | 64 | 65 | #### Bug Fixes 66 | 67 | * **cp:** fixes copy and call to callbacks ([fd1d122d](https://github.com/hoodiehq/hoodie-cli/commit/fd1d122d033a94fbdf2e8ea228dd5b5b9af4f1e4)) 68 | * **name:** adds default name back in ([d0bca1a7](https://github.com/hoodiehq/hoodie-cli/commit/d0bca1a7848e72e241ae6e0083f8610bf9fd458b)) 69 | * **npm:** fix path template gets installed into ([891f81d5](https://github.com/hoodiehq/hoodie-cli/commit/891f81d53f7735e4621f4c59986c6c346753eb95)) 70 | * **template:** adds helpers and fixes ([8f7f300f](https://github.com/hoodiehq/hoodie-cli/commit/8f7f300f1f6c962a0c1fbf04ef18ec027cd2dd96)) 71 | 72 | 73 | 74 | ### 0.5.3 (2014-07-30) 75 | 76 | 77 | #### Features 78 | 79 | * **process:** prevent hoodie-server from crashing ([e54a75e4](https://github.com/hoodiehq/hoodie-cli/commit/e54a75e4edc1cf8af29713528089deffcd0fc5af)) 80 | 81 | 82 | 83 | ### 0.5.2 (2014-07-25) 84 | 85 | 86 | #### Bug Fixes 87 | 88 | * **update-notifier:** pass pkg details to update-notifier ([e5cdc9ac](https://github.com/hoodiehq/hoodie-cli/commit/e5cdc9ac00b1648c252df678d00e533c4cfe328d)) 89 | 90 | 91 | 92 | ### 0.5.1 (2014-07-17) 93 | 94 | 95 | 96 | ## 0.5.0 (2014-07-17) 97 | 98 | 99 | #### Features 100 | 101 | * **options:** Allow users to specify custom ports with hoodie start. ([dd14ec59](https://github.com/hoodiehq/hoodie-cli/commit/dd14ec597722f45e41015574eec993a6d2bdcbe6)) 102 | 103 | 104 | 105 | ### 0.4.17 (2014-07-14) 106 | 107 | 108 | 109 | ### 0.4.16 (2014-07-14) 110 | 111 | 112 | 113 | ### 0.4.14 (2014-06-05) 114 | 115 | 116 | 117 | ### 0.4.13 (2014-06-04) 118 | 119 | 120 | 121 | ### 0.4.12 (2014-06-04) 122 | 123 | 124 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Hoodie.js 2 | 3 | Please take a moment to review this document in order to make the contribution 4 | process easy and effective for everyone involved. 5 | 6 | Following these guidelines helps to communicate that you respect the time of 7 | the developers managing and developing this open source project. In return, 8 | they should reciprocate that respect in addressing your issue, assessing 9 | changes, and helping you finalize your pull requests. 10 | 11 | 12 | ## Using the issue tracker 13 | 14 | First things first: **Do NOT report security vulnerablities in public issues!** Please disclose responsibly by letting [the Hoodie team](mailto:team@thehoodiefirm.com?subject=Security) know upfront. We will assess the issue as soon as possible on a best-effort basis and will give you an estimate for when we have a fix and release available for an eventual public disclosure. 15 | 16 | The issue tracker is the preferred channel for [bug reports](#bugs), 17 | [features requests](#features) and [submitting pull 18 | requests](#pull-requests), but please respect the following restrictions: 19 | 20 | * Please **do not** use the issue tracker for personal support requests. Use 21 | [#Hoodie.js](http://webchat.freenode.net/?channels=hoodie) on Freenode. 22 | 23 | * Please **do not** derail or troll issues. Keep the discussion on topic and 24 | respect the opinions of others. 25 | 26 | 27 | 28 | ## Bug reports 29 | 30 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 31 | Good bug reports are extremely helpful - thank you! 32 | 33 | Guidelines for bug reports: 34 | 35 | 1. **Use the GitHub issue search** — check if the issue has already been 36 | reported. 37 | 38 | 2. **Check if the issue has been fixed** — try to reproduce it using the 39 | latest `master` or development branch in the repository. 40 | 41 | 3. **Isolate the problem** — ideally create a [reduced test 42 | case](http://css-tricks.com/6263-reduced-test-cases/). 43 | 44 | A good bug report shouldn't leave others needing to chase you up for more 45 | information. Please try to be as detailed as possible in your report. What is 46 | your environment? What steps will reproduce the issue? What OS experiences the 47 | problem? What would you expect to be the outcome? All these details will help 48 | people to fix any potential bugs. 49 | 50 | Example: 51 | 52 | > Short and descriptive example bug report title 53 | > 54 | > A summary of the issue and the browser/OS environment in which it occurs. If 55 | > suitable, include the steps required to reproduce the bug. 56 | > 57 | > 1. This is the first step 58 | > 2. This is the second step 59 | > 3. Further steps, etc. 60 | > 61 | > `` - a link to the reduced test case 62 | > 63 | > Any other information you want to share that is relevant to the issue being 64 | > reported. This might include the lines of code that you have identified as 65 | > causing the bug, and potential solutions (and your opinions on their 66 | > merits). 67 | 68 | 69 | 70 | ## Feature requests 71 | 72 | Feature requests are welcome. But take a moment to find out whether your idea 73 | fits with the scope and aims of the project. It's up to *you* to make a strong 74 | case to convince the project's developers of the merits of this feature. Please 75 | provide as much detail and context as possible. 76 | 77 | 78 | 79 | ## Pull requests 80 | 81 | Good pull requests - patches, improvements, new features - are a fantastic 82 | help. They should remain focused in scope and avoid containing unrelated 83 | commits. 84 | 85 | **Please ask first** before embarking on any significant pull request (e.g. 86 | implementing features, refactoring code), otherwise you risk spending a lot of 87 | time working on something that the project's developers might not want to merge 88 | into the project. 89 | 90 | Please adhere to the coding conventions used throughout a project (indentation, 91 | accurate comments, etc.) and any other requirements (such as test coverage). 92 | 93 | Adhering to the following this process is the best way to get your work 94 | included in the project: 95 | 96 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 97 | and configure the remotes: 98 | 99 | ```bash 100 | # Clone your fork of the repo into the current directory 101 | git clone https://github.com//hoodie.js 102 | # Navigate to the newly cloned directory 103 | cd Hoodie.js 104 | # Assign the original repo to a remote called "upstream" 105 | git remote add upstream https://github.com/hoodiehq/hoodie.js 106 | ``` 107 | 108 | 2. If you cloned a while ago, get the latest changes from upstream: 109 | 110 | ```bash 111 | git checkout master 112 | git pull upstream master 113 | ``` 114 | 115 | 3. Create a new topic branch (off the main project development branch) to 116 | contain your feature, change, or fix: 117 | 118 | ```bash 119 | git checkout -b 120 | ``` 121 | 122 | 4. Make sure to update, or add to the tests when appropriate. Patches and 123 | features will not be accepted without tests. Run `npm test` to check that 124 | all tests pass after you've made changes. 125 | 126 | 5. Commit your changes in logical chunks. Please adhere to these [git commit 127 | message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 128 | or your code is unlikely be merged into the main project. Use Git's 129 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 130 | feature to tidy up your commits before making them public. 131 | 132 | 6. Locally merge (or rebase) the upstream development branch into your topic branch: 133 | 134 | ```bash 135 | git pull [--rebase] upstream master 136 | ``` 137 | 138 | 7. Push your topic branch up to your fork: 139 | 140 | ```bash 141 | git push origin 142 | ``` 143 | 144 | 8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 145 | with a clear title and description. 146 | 147 | 9. If you are asked to amend your changes before they can be merged in, please 148 | use `git commit --amend` (or rebasing for multi-commit Pull Requests) and 149 | force push to your remote feature branch. You may also be asked to squash 150 | commits. 151 | 152 | **IMPORTANT**: By submitting a patch, you agree to license your work under the 153 | same license as that used by the project. 154 | 155 | 156 | ## Triagers 157 | 158 | There is a [defined process](TRIAGING.md) to manage issues, because this helps to speed up releases and minimizes user pain. 159 | Triaging is a great way to contribute to Hoodie without having to write code. 160 | If you are interested, please [leave a comment here](https://github.com/hoodiehq/discussion/issues/50) asking to join the triaging team. 161 | 162 | 163 | ## Maintainers 164 | 165 | If you have commit access, please follow this process for merging patches and cutting new releases. 166 | 167 | ### Reviewing changes 168 | 169 | 1. Check that a change is within the scope and philosophy of the project. 170 | 2. Check that a change has any necessary tests and a proper, descriptive commit message. 171 | 3. Checkout the change and test it locally. 172 | 4. If the change is good, and authored by someone who cannot commit to 173 | `master`, please try to avoid using GitHub's merge button. Apply the change 174 | to `master` locally (feel free to amend any minor problems in the author's 175 | original commit if necessary). 176 | 5. If the change is good, and authored by another maintainer/collaborator, give 177 | them a "Ship it!" comment and let them handle the merge. 178 | 179 | ### Submitting changes 180 | 181 | 1. All non-trivial changes should be put up for review using GitHub Pull 182 | Requests. 183 | 2. Your change should not be merged into `master` (or another feature branch), 184 | without at least one "Ship it!" comment from another maintainer/collaborator 185 | on the project. "Looks good to me" is not the same as "Ship it!". 186 | 3. Try to avoid using GitHub's merge button. Locally rebase your change onto 187 | `master` and then push to GitHub. 188 | 4. Once a feature branch has been merged into its target branch, please delete 189 | the feature branch from the remote repository. 190 | 191 | ### Releasing a new version 192 | 193 | Releasing a new version is automated with `grunt release`. 194 | According to the semver spec the command tries to find the correct version based on changes made. 195 | 196 | You may still add flags to specify new versions explicitly. 197 | 1. `grunt release:patch`: 0.0.1 => 0.0.2 198 | 2. `grunt release:minor`: 0.0.2 => 0.1.0 199 | 3. `grunt release:major`: 0.1.0 => 1.0.0 200 | 4. `grunt release --setversion=4.12.3-alpha.19`: 1.0.0 => 4.12.3-alpha.19 201 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | /*global module:false*/ 2 | 3 | module.exports = function (grunt) { 4 | 5 | 'use strict'; 6 | 7 | require('load-grunt-tasks')(grunt); 8 | 9 | // Project configuration. 10 | grunt.initConfig({ 11 | 12 | jshint: { 13 | files: [ 14 | 'Gruntfile.js', 15 | 'lib/**/*.js', 16 | 'bin/*.js' 17 | ], 18 | options: { 19 | jshintrc: '.jshintrc' 20 | } 21 | }, 22 | 23 | simplemocha: { 24 | options: { 25 | reporter: 'spec', 26 | node_env: 'testing', 27 | ignoreLeaks: true 28 | }, 29 | full: { src: ['spec/runner.js'] } 30 | }, 31 | 32 | watch: { 33 | files: ['<%= jshint.files %>'], 34 | tasks: 'jshint' 35 | } 36 | 37 | }); 38 | 39 | // Default task. 40 | grunt.registerTask('test', ['jshint', 'simplemocha:full']); 41 | grunt.registerTask('ci', ['test', 'integration-test']); 42 | grunt.registerTask('default', ['test']); 43 | }; 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2013-2016 the Hoodie Community and other contributors. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hoodie command line utility 2 | [![Build Status](https://travis-ci.org/hoodiehq/hoodie-cli.svg?branch=master)](https://travis-ci.org/hoodiehq/hoodie-cli) 3 | [![Dependency Status](https://david-dm.org/hoodiehq/hoodie-cli.svg)](https://david-dm.org/hoodiehq/hoodie-cli) 4 | [![devDependency Status](https://david-dm.org/hoodiehq/hoodie-cli/dev-status.svg)](https://david-dm.org/hoodiehq/hoodie-cli#info=devDependencies) 5 | 6 | [![NPM](https://nodei.co/npm/hoodie-cli.png)](https://nodei.co/npm/hoodie-cli/) 7 | 8 | 9 | ## Installation 10 | Please ensure you have [__node__](http://nodejs.org) installed. 11 | 12 | ``` 13 | npm install -g hoodie-cli 14 | ``` 15 | 16 | 17 | ## Usage 18 | 19 | See `hoodie -h` or `hoodie --help` for a summary of this information. 20 | 21 | + `hoodie new [-t