Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows tests #4

Merged
merged 4 commits into from
Dec 28, 2014
Merged

Fix windows tests #4

merged 4 commits into from
Dec 28, 2014

Conversation

heikki
Copy link
Contributor

@heikki heikki commented Dec 28, 2014

Includes things mentioned in #3.
I tested on mac & windows with node 0.10.33.

@phated
Copy link
Member

phated commented Dec 28, 2014

Thanks! Is there any way to get this working without node-exit? In gulpjs/gulp#172 we decided not to use node-exit because it removes any process.on('exit') that have been added?

@heikki
Copy link
Contributor Author

heikki commented Dec 28, 2014

Hmm.. don't know yet. I'll check if I can find some alternative.

@heikki
Copy link
Contributor Author

heikki commented Dec 28, 2014

In gulpjs/gulp#172 we decided not to use node-exit because it removes any process.on('exit') that have been added?

Do you know how to reproduce that? All process.on('exit') s seem to work no matter where I put them. Also, time-grunt that @sindresorhus linked in that issue has comments suggesting that it may not be a problem anymore:

// crazy hack to work around stupid node-exit
// Can this be removed now that node-exit#4 has been resolved?
// https://github.com/cowboy/node-exit/issues/4
var originalExit = process.exit;

function exit(exitCode) {
  clearInterval(interval);
  process.emit('timegruntexit', exitCode);
  exit = function () {};
}

Testem includes similar solution as node-exit and that works too: https://github.com/airportyh/testem/blob/master/lib/clean_exit.js

@heikki
Copy link
Contributor Author

heikki commented Dec 28, 2014

It's still a problem & there's open issue too cowboy/node-exit#7
Btw. same code that fails with node-exit works with testem version.

https://gist.github.com/heikki/8b11d5bb918ecb9de6bf

@heikki
Copy link
Contributor Author

heikki commented Dec 28, 2014

Minimal exit tweak that makes tests pass and affects only windows:

function exit(code) {
  if (process.platform === 'win32' && process.stdout.bufferSize) {
    process.stdout.once('drain', function() {
      process.exit(code);
    });
    return;
  }
  process.exit(code);
}

@phated
Copy link
Member

phated commented Dec 28, 2014

I'm good with this. Thanks!

phated added a commit that referenced this pull request Dec 28, 2014
@phated phated merged commit 541c84d into gulpjs:master Dec 28, 2014
@phated phated mentioned this pull request Dec 28, 2014
@heikki heikki deleted the fix-windows-tests branch December 28, 2014 23:51
lejoe added a commit to ginetta/skeleton that referenced this pull request Nov 11, 2015
You will need to replace your local cli too:
```
npm uninstall gulp
npm install -g gulpjs/gulp-cli#4.0
```
lejoe added a commit to ginetta/skeleton-styleguide that referenced this pull request Dec 17, 2015
commit 118cc2f9787fe504d401d720fe290c6339aad8ed
Merge: 178e603 3710847
Author: lejoe <ciao@lejoe.com>
Date:   Thu Dec 17 17:01:22 2015 +0100

    Merge branch 'master' of github.com:ginetta/skeleton into update-skeleton

    # Conflicts:
    #	bower.json
    #	gulp/config.js
    #	src/pages/index.jade
    #	src/styles/_3.base.scss

commit 3710847
Merge: 1226bb2 a09b9a6
Author: João Figueiredo <lucalanca2@hotmail.com>
Date:   Thu Dec 3 15:47:14 2015 +0100

    Merge pull request #101 from ginetta/webpack

    Webpack

commit a09b9a6
Author: lejoe <ciao@lejoe.com>
Date:   Thu Dec 3 10:32:53 2015 +0100

    Removes jquery as default

    Adds sensible/mediaquery as the default example.
    Which also contains jquery but it you remove it, jquery will also be removed

commit 249e79d
Author: lejoe <ciao@lejoe.com>
Date:   Wed Dec 2 19:17:54 2015 +0100

    Corrects the vendor path

commit 229419e
Author: lejoe <ciao@lejoe.com>
Date:   Wed Dec 2 15:34:30 2015 +0100

    Moves vendors bundling for the gulp task to a file

    1. @lucalanca is this what you meant?
    2. Do I need to require vendor.js in my main.js or will webpack take care of this?

    Will take care of the jquery question in another commit

commit ddb8650
Author: lejoe <ciao@lejoe.com>
Date:   Wed Dec 2 15:15:16 2015 +0100

    Makes the JS examples better

commit 2abf10d
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 25 11:01:41 2015 +0100

    Adds webpack for the js

commit 9c61ea8
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 25 11:00:17 2015 +0100

    Adds an exemple of js in a component

commit 1226bb2
Merge: 19311c9 bbcc47f
Author: lejoe <ciao@lejoe.com>
Date:   Tue Nov 24 17:57:54 2015 +0100

    Merge pull request #99 from ginetta/gulp4-migration

    Gulp4 migration

commit bbcc47f
Author: lejoe <ciao@lejoe.com>
Date:   Mon Nov 23 17:25:48 2015 +0100

    Corrects the readme with the new commands

commit b6844ee
Author: lejoe <ciao@lejoe.com>
Date:   Mon Nov 23 17:25:02 2015 +0100

    Adds the gulp-cli to the package

    This will also avoid problem of switching project with gulp version 3.

    Also now you need to ```use npm start ``` instead of ```gulp```

commit 9b0e25b
Author: lejoe <ciao@lejoe.com>
Date:   Mon Nov 23 16:52:05 2015 +0100

    Adds the node_modules to the sass include paths

commit 332ae13
Author: lejoe <ciao@lejoe.com>
Date:   Mon Nov 23 15:46:38 2015 +0100

    Adds npm scripts for our tasks

    Fixes #100

commit d63e172
Merge: e62d22c 19311c9
Author: lejoe <ciao@lejoe.com>
Date:   Mon Nov 23 15:44:38 2015 +0100

    Merge branch 'master' into gulp4-migration

commit 19311c9
Merge: 684b4aa 874ee0d
Author: lejoe <ciao@lejoe.com>
Date:   Fri Nov 13 14:50:34 2015 +0100

    Merge pull request #92 from ginetta/81-remove-bower

    Remove bower

commit 874ee0d
Merge: 6524e21 684b4aa
Author: lejoe <ciao@lejoe.com>
Date:   Fri Nov 13 14:49:24 2015 +0100

    Merge branch 'master' into 81-remove-bower

    Conflicts:
    	package.json

commit 6524e21
Author: Peter Braden <peterbraden@peterbraden.co.uk>
Date:   Wed Nov 11 14:02:59 2015 +0000

    Update re the comment.

commit e62d22c
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 11 13:13:30 2015 +0100

    Removes console logs

commit c84dd63
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 11 13:02:28 2015 +0100

    Simplifies the gulp taskhelper

    Moves the config setting to the helper file

commit 15c715d
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 11 12:18:12 2015 +0100

    Uses gulp.series & gulp.parallel

commit bbe7fea
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 11 12:17:30 2015 +0100

    Corrects a bug with watching favicon files

commit 807bfaa
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 11 12:16:13 2015 +0100

    Replaces gulp help with the new task descriptions

commit d3916f8
Author: lejoe <ciao@lejoe.com>
Date:   Tue Nov 10 15:28:29 2015 +0100

    Uses the new gulp version

    You will need to replace your local cli too:
    ```
    npm uninstall gulp
    npm install -g gulpjs/gulp-cli#4.0
    ```

commit 684b4aa
Merge: 5a05956 68af114
Author: lejoe <ciao@lejoe.com>
Date:   Tue Nov 10 12:38:10 2015 +0100

    Merge pull request #97 from ginetta/revert-new-file-watch

    Revert "Makes sure the new files are watched"

commit 68af114
Author: lejoe <ciao@lejoe.com>
Date:   Fri Nov 6 10:45:04 2015 +0100

    Revert "Makes sure the new files are watched"

    This reverts commit 67fd2bc.

commit 5a05956
Merge: a30613a 67fd2bc
Author: David Aerne <meodai@gmail.com>
Date:   Wed Nov 4 18:05:26 2015 +0100

    Merge pull request #96 from ginetta/watch-new-files

    Makes sure the new files are watched

commit 67fd2bc
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 4 17:40:51 2015 +0100

    Makes sure the new files are watched

    By moving the var settings inside the returned function, the globs will be reset each time the tasks run

commit a30613a
Merge: 38fbcba 5169f94
Author: Peter Braden <peterbraden@peterbraden.co.uk>
Date:   Wed Nov 4 15:18:31 2015 +0100

    Merge pull request #95 from ginetta/#76-watch-layouts

    Watch layouts files

commit 5169f94
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 4 15:11:23 2015 +0100

    Watches the layouts files

commit 53caee7
Author: lejoe <ciao@lejoe.com>
Date:   Wed Nov 4 15:10:52 2015 +0100

    Adds the path to layouts in the config

commit 38fbcba
Merge: 7cd99d3 8cfbce7
Author: Peter Braden <peterbraden@peterbraden.co.uk>
Date:   Tue Oct 27 11:07:37 2015 +0100

    Merge pull request #94 from ginetta/jade-inline-helper

    Jade inline helper

commit 8cfbce7
Author: David Aerne <meodai@gmail.com>
Date:   Thu Oct 22 11:26:05 2015 +0200

    adds jadeInlineFile to helpers

commit ed34f75
Author: David Aerne <meodai@gmail.com>
Date:   Thu Oct 22 11:25:42 2015 +0200

    adds jade-inline-file NPM package

commit 7cd99d3
Author: lejoe <ciao@lejoe.com>
Date:   Mon Oct 12 11:20:19 2015 +0200

    Sets the right project path for skeleton

    Keeps the reference so that it's found when you search for project-name

commit 2bf0dd5
Author: Peter Braden <peterbraden@peterbraden.co.uk>
Date:   Mon Oct 12 11:14:50 2015 +0200

    Remove bower

commit e5719b7
Merge: bd65d9b cd696f0
Author: lejoe <ciao@lejoe.com>
Date:   Mon Oct 5 14:31:16 2015 +0200

    Merge pull request #55 from ginetta/v2/new-deploy

    Deploy paths for the new server

commit bd65d9b
Merge: f0a1c6b 6b0b94c
Author: lejoe <ciao@lejoe.com>
Date:   Mon Sep 28 23:03:28 2015 +0200

    Merge pull request #75 from ginetta/v2/accessibility

    Adds accessibility audit task.

commit 6b0b94c
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 15:30:27 2015 +0200

    Removes console.log.

commit 8cdbca0
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 15:29:43 2015 +0200

    Removes duplicated <p> on example page.

commit 93f0566
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 15:21:07 2015 +0200

    Changes build:accessibility to test:accessibility and creates a main 'test' task.

commit 62aa371
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 15:20:45 2015 +0200

    Removes build html files from config paths.

commit 22fce1e
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 15:20:24 2015 +0200

    Changes index page title to project-name

commit 140fbe6
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 13:15:27 2015 +0200

    Doesn't ouput NOTICE messages from AccessSniff.

commit 10c804b
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 12:09:31 2015 +0200

    Changes default link style so it passes a11y minimum contrast.

commit c7f46ec
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 12:05:26 2015 +0200

    Adds title to the index example page (so we don't forget to add it)

commit 020afe8
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 12:05:05 2015 +0200

    Adds language to layout by exposing the current language as a jade global.

commit 8f459c7
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 11:56:56 2015 +0200

    Removes a11y import from pages.js

commit da386ec
Author: Joao Figueiredo <lucalanca2@hotmail.com>
Date:   Wed Sep 23 11:42:53 2015 +0200

    Adds accessibility task.

commit f0a1c6b
Merge: 7d52acc 40fdb13
Author: João Figueiredo <lucalanca2@hotmail.com>
Date:   Tue Sep 22 15:55:06 2015 +0200

    Merge pull request #65 from ginetta/v2/update-linter

    V2/update linter

commit 40fdb13
Author: lejoe <ciao@lejoe.com>
Date:   Tue Sep 1 16:51:04 2015 +0200

    Removes a deprecated rule

commit 37cbe56
Author: lejoe <ciao@lejoe.com>
Date:   Tue Sep 1 16:50:50 2015 +0200

    Updates the js linter

commit cd696f0
Author: lejoe <ciao@lejoe.com>
Date:   Sat Jul 25 22:51:41 2015 +0200

    Corrects the deploy paths for the new server
rengokantai added a commit to rengokantai/udreajsnextshi that referenced this pull request Mar 8, 2016
phated added a commit that referenced this pull request Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants