npm publish task wip

This commit is contained in:
Tim Lancina
2015-08-10 18:51:41 -05:00
parent a5b47583a0
commit 5b30c79697
2 changed files with 19 additions and 2 deletions

View File

@@ -168,7 +168,11 @@ function transpile(moduleType) {
}
gulp.task('transpile.system', function() { return transpile("system"); });
gulp.task('transpile.common', function() { return transpile("common"); });
gulp.task('transpile.common', function() {
// necessary for publish task, remove if we ever do incremental builds with cjs
cache.caches && delete cache.caches.transpile;
return transpile("common");
});
gulp.task('transpile', ['transpile.system']);
gulp.task('bundle.ionic', ['transpile'], function() {
@@ -317,4 +321,16 @@ gulp.task('docs', function() {
} catch (err) {
console.log(err.stack);
}
});
gulp.task('publish', function(done) {
runSequence(
'clean',
['bundle', 'sass', 'fonts'],
'transpile.common',
function() {
var packageJSONContents = '{\n "name": "ionic2",\n "version": "2.0.0-alpha.1",\n "license": "Apache-2.0",\n "repository": {\n "type": "git",\n "url": "https://github.com/driftyco/ionic2.git"\n }\n}\n';
fs.writeFile("dist/package.json", packageJSONContents, done);
}
)
})

View File

@@ -1,10 +1,11 @@
{
"name": "ionic2",
"version": "2.0.0-alpha.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/driftyco/ionic2.git"
},
"version": "0.0.0",
"devDependencies": {
"angular2-bundle": "tlancina/angular2-bundle",
"canonical-path": "0.0.2",