Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sudo: false
language: node_js
node_js:
- '5'
- '4'
- '0.12'
- '0.10'
matrix:
fast_finish: true
allow_failures:
- node_js: '4'
- node_js: '0.10'
- node_js: '0.12'
10 changes: 8 additions & 2 deletions updatefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

var os = require('os');
var path = require('path');
var fs = require('fs');
var isValid = require('is-valid-app');

module.exports = function(app, base, env) {
if (!isValid(app, 'updater-editorconfig')) return;
var src = path.resolve.bind(path, __dirname, 'templates');

var src = path.join( os.homedir(), './.templates', '_editorconfig');
if (!fs.existsSync( src )) {
src = path.join( __dirname, 'templates/_editorconfig');
}

/**
* Update or add an `.editorconfig` file in the current working directory.
Expand All @@ -19,7 +24,8 @@ module.exports = function(app, base, env) {
*/

app.task('editorconfig', function() {
return app.copy(src('_editorconfig'), function(file) {

return app.copy( src, function(file) {
file.basename = '.editorconfig';
return app.options.dest || app.cwd;
});
Expand Down