Commit Graph

7 Commits

Author SHA1 Message Date
Gabor Javorszky
a341bbde97 Fix typo in function name (#7982)
no issue
- checkDirectoryExistance -> checkDirectoryExistence
2017-02-11 12:48:04 +00:00
Kevin Ansfield
49191c9023 🎨 improve gulp dev reload behaviour (#7543)
refs #7427
- prevent unnecessary reloads of the server due to changes in client files, this makes working on the client as quick/painless as the old `grunt dev` command
- fix nodemon `watch` config - it only accepts directories not files
- update nodemon `ignore` config - directories should be specified without a `/*`, add directories that are changed on each client re-compile
2016-10-11 14:06:07 +02:00
Aileen Nowak
92be253c27 🛠 Gulp help (#7462)
refs #7427
needs #7458

Adds a `gulp help` task which description and available options for each gulp task.
2016-10-03 15:08:40 +01:00
Aileen Nowak
43a2220298 🛠 Gulp lint task (#7458)
refs #7427

Adds a `gulp lint` task, as well as subtasks `gulp jshint`, `gulp jscs` and `gulp json` which can be started independently.
2016-10-03 10:30:22 +02:00
Aileen Nowak
7f3876e456 🛠 Improve existing gulp tasks (#7444)
refs #7427

- Deleting the `built` or `dist` directory doesn't result in an error, when running `gulp dev`
- Adds default task as `gulp dev`
- Adds abbreviations for the repositories in `gulp setup` task (`--ghost` -> `-g`, `--admin` -> `-a` and `--casper` -> `-c`) to type less 😊
- Installs dependencies on `gulp dev`, if called with `--deps` or `-d`
- Sets `verbose` option nodemon to default (=`false`) to have less unneccessary logging.
- Will do a delete of all dependencies and install them again ('FFS'), if `gulp deps` is called with a force flag.
- Will update submodules not matter what, if `gulp submodules` is called with a force flag. Calling `gulp submodules` without the force flag will only update/initiate the submodules, if the folders don't exist.
- Better logging messages and sequential task handling.
- Removes `gulp-shell` as dependency, as this is on gulp's blacklist
- Refactors code, that used `gulp-shell` to use `child_process.exec` or `spawn` instead.
- Exits properly if node crashes
-----------------------

Tasks available after this PR:

- `gulp server`: Starts a nodemon server with livereload of the ghost core only. No client build here.

- `gulp dev`: [ --deps | -d ] Starts development mode for Ghost, incl. client build and livereload for both. Will also update the submodules if the directories are missing. If called with with `--deps` flag, it will install client and core dependencies.

- `gulp submodules`: [ --force | -f ] Will update the submodules, if directories are missing. Will update no matter what, if called with force flag.

- `gulp deps`: [ --force | -f ] Will update client and core dependencies. Does a fresh install of both (delete, cache clear and install) if called with force flag.

- `gulp setup`: </br>[ --ghost | -g 'branch' or 'pr/1234' ]
		[ --admin | -a 'branch' or 'pr/1234' ]
		[ --casper | -c 'branch' or 'pr/1234' ]
		[ --force | -f ]
		Takes various - optional - parameters. If called without parameters, this task will update submodules first (if directory doesn't exist) and then install client and core dependendies.
		If called with branch 'master', submodules will be updated.
		Calling with the force flag will do a clean install of the dependencies.
		There's no autocomplete for branchnames at the moment 😔
		To check out a PR (e. g. `--ghost pr/7444`), it is necessary, that you add an additional fetch line in the `.git/config` file for each repository: `fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*`. See https://dev.ghost.org/easy-git-pr-test/ for further information.
2016-09-29 19:32:17 +02:00
Aileen Nowak
3ee7f5cdbd 🛠 Gulp setup (#7439)
refs #7427

With this PR, we'll get some development tooling magic:
`gulp setup`
Will update dependecies and submodules (if submodule branches are on master) for
currently chosen branches.

`gulp setup --force`
Will delete all dependencies and install them again, incl. submodules for
currently chosen branches.

`gulp setup --ghost some-branch --admin some-branch --casper some-branch`
Will checkout the branches for each repository.
Can also be used to checkout only selected branches e. g.
`gulp setup --admin some-branch`
Will leave the current branch for `ghost` and `casper`, but checkout the named
branch for admin. Will also install dependencies.

`gulp setup --admin pr/123 --ghost pr/1234 --casper pr/123`
Will fetch the named PR of the repository and checkout to this new branch.
Will also install dependencies. NOTE: This works only with an additional fetch line
in the .git/config file for each repository: `fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*`.
See https://dev.ghost.org/easy-git-pr-test/ for further information.

All the combinations above can be executed with the `--force` or `-f` flag, which
will delete the dependencies and install them again, but for the chosen branches.
2016-09-26 18:17:40 +02:00
Aileen Nowak
f9ea55d57b 🛠 Gulp tooling for ghost
refs #7427

Use `gulp dev` to start development mode. Starts ember build and does livereload for client and server changes.

Use `gulp server` to start server development mode. Doesn't start ember build and livereloads for server changes only.
2016-09-22 18:01:26 +02:00