Skip to content

Commit e0fb073

Browse files
committed
Initial NPM publish function.
Added more logs.
1 parent 3c0135a commit e0fb073

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

build/tasks/publish.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,22 @@ module.exports = function (grunt) {
176176
}
177177
}
178178
);
179+
}).then(function () {
180+
grunt.log.writeln('Pushed to git.');
181+
});
182+
}
183+
184+
function publishNpm () {
185+
var cwd = process.cwd();
186+
process.chdir(require('path').join(cwd, 'dist/npm'));
187+
grunt.log.writeln('Publishing to NPM.');
188+
return npmUtils.setAuthToken()
189+
.then(function () {
190+
return npmUtils.publish();
191+
})
192+
.then(function () {
193+
process.chdir(cwd);
194+
grunt.log.writeln('Published to npm.');
179195
});
180196
}
181197

@@ -184,6 +200,7 @@ module.exports = function (grunt) {
184200
var done = this.async();
185201
commitRelease()
186202
.then(function () {
203+
grunt.log.writeln('Done publishing.');
187204
done();
188205
}).catch(function (e) {
189206
grunt.log.error(e);

0 commit comments

Comments
 (0)