Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
changed options, updated devDeps
Browse files Browse the repository at this point in the history
changed reinstall behaviour
- always resolves dependencies
- saves to config/bundle
- overwrites existing files

dropped some unused code
dropped some devDependencies
added ./tmp to .npmignore
  • Loading branch information
Bartvds committed Mar 26, 2014
1 parent 8cef395 commit f862dcd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
1 change: 1 addition & 0 deletions .npmignore
Expand Up @@ -10,4 +10,5 @@ Gruntfile.js
/node_modules
/tsd-cache
/test
/tmp
/*.tgz
2 changes: 0 additions & 2 deletions Gruntfile.js
Expand Up @@ -83,8 +83,6 @@ module.exports = function (grunt) {
command: 'reinstall',
latest: true,
opts: {
saveToConfig: true,
resolveDependencies: true
}
}
}, ['pass']);
Expand Down
5 changes: 3 additions & 2 deletions lib/runner.js
Expand Up @@ -19,6 +19,9 @@ function getRunner(grunt) {

return api.readConfig(options.config, (!!options.config)).then(function () {
var opts = tsd.Options.fromJSON(options.opts);
opts.overwriteFiles = true;
opts.resolveDependencies = true;
opts.saveToConfig = true;

if (options.latest) {
var query = new tsd.Query();
Expand All @@ -29,8 +32,6 @@ function getRunner(grunt) {
query.versionMatcher = new tsd.VersionMatcher('latest');

return api.select(query, opts).then(function (selection) {
opts.overwrite = true;
opts.saveToConfig = true;
return api.install(selection, opts);
});
}
Expand Down
4 changes: 1 addition & 3 deletions package.json
Expand Up @@ -44,11 +44,9 @@
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-jshint": "~0.7.2",
"jshint-path-reporter": "0.1",
"chai": "git://github.com/Bartvds/chai/#fixes/1.8.x",
"chai-fs": "0.0.1",
"chai": "~1.9.1",
"grunt-continue": "0.0.1",
"grunt-contrib-copy": "~0.4.1",
"difflet": "~0.2.6",
"unfunk-diff": "0.0.1"
},
"peerDependencies": {
Expand Down
28 changes: 0 additions & 28 deletions test/helper.js
Expand Up @@ -9,34 +9,6 @@ var differ = require('unfunk-diff');

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

//for safety
function promiseDoneMistake() {
throw new Error('don\'t use a done() callback when using eventually()');
}

function patchEventually(word) {
word.eventually = function eventually(expectation, assertion) {
word(expectation, function (done) {
Q(assertion(promiseDoneMistake)).done(function () {
done();
}, function (err) {
done(err);
});
});
};
}

//monkey patch
if (typeof it !== 'undefined') {
patchEventually(it);
patchEventually(before);
patchEventually(beforeEach);
patchEventually(after);
patchEventually(afterEach);
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

function testName(filename) {
return path.basename(path.dirname(filename)) + '/' + path.basename(filename);
}
Expand Down

0 comments on commit f862dcd

Please sign in to comment.