updated compile process
This commit is contained in:
parent
6ae05de2b1
commit
2adf0e2bd3
@ -1,11 +1,8 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "4.1"
|
||||
before_install:
|
||||
- nvm install stable
|
||||
- node -v
|
||||
- npm -v
|
||||
- npm install -g gulp
|
||||
- npm install gulp
|
||||
- npm install gulp-typescript
|
||||
- npm install -g tsd
|
||||
deploy:
|
||||
provider: npm
|
||||
email: npm@smart-coordination.com
|
||||
|
14
package.json
14
package.json
@ -4,8 +4,13 @@
|
||||
"description": "beautiful logging",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "(cd ts/compile && gulp) && (node test.js)",
|
||||
"release": "(git pull origin master && npm version patch && git push origin master && git checkout release && git merge master && git push origin release && git checkout master)"
|
||||
"test": "(cd ts/compile && node compile.js) && (node ./test.js)",
|
||||
"gitsetup": "(git config push.followTags true)",
|
||||
"push": "(git push origin master && git push origin release && git push --follow-tags)",
|
||||
"reinstall": "(rm -r node_modules && npm install)",
|
||||
"release": "(npm test) && (git pull origin master && npm version patch && git checkout release && git merge master && git checkout master && npm run push)",
|
||||
"update": "(git checkout master && git pull origin master) && (npm install)",
|
||||
"upgrade": "(npm run update) && (ncu upgradeAll && npm install)"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -27,5 +32,10 @@
|
||||
"cli-color": "^1.1.0",
|
||||
"cli-table2": "^0.1.9",
|
||||
"colors": "1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-typescript": "^2.10.0",
|
||||
"pushrocks": "^1.0.25"
|
||||
}
|
||||
}
|
||||
|
30
ts/compile/compile.js
Normal file
30
ts/compile/compile.js
Normal file
@ -0,0 +1,30 @@
|
||||
// import gulp
|
||||
var gulp = require("gulp")
|
||||
var gulpTypescript = require("gulp-typescript");
|
||||
var pr = require("pushrocks");
|
||||
|
||||
gulp.task('compileTS', function() {
|
||||
var stream = gulp.src('../index.ts')
|
||||
.pipe(gulpTypescript({
|
||||
out: "index.js"
|
||||
}))
|
||||
.pipe(gulp.dest("../../"));
|
||||
return stream;
|
||||
});
|
||||
|
||||
gulp.task('compileTestTS', function() {
|
||||
var stream = gulp.src('../test.ts')
|
||||
.pipe(gulpTypescript({
|
||||
out: "test.js"
|
||||
}))
|
||||
.pipe(gulp.dest("../../"));
|
||||
return stream;
|
||||
});
|
||||
|
||||
gulp.task('default',['compileTS','compileTestTS'], function() {
|
||||
pr.beautylog.success('Typescript compiled');
|
||||
});
|
||||
|
||||
//lets tell gulp to start with the default task.
|
||||
pr.beautylog.log('Starting Gulp to compile TypeScript');
|
||||
gulp.start.apply(gulp, ['default']);
|
@ -1,2 +0,0 @@
|
||||
nvm use v0.12.7
|
||||
gulp
|
@ -1,25 +0,0 @@
|
||||
// import gulp
|
||||
var gulp = require("gulp"),
|
||||
gulpTypescript = require("gulp-typescript");
|
||||
|
||||
gulp.task('compileTS', function() {
|
||||
var stream = gulp.src('../index.ts')
|
||||
.pipe(gulpTypescript({
|
||||
out: "index.js"
|
||||
}))
|
||||
.pipe(gulp.dest("../../"));
|
||||
return stream;
|
||||
});
|
||||
|
||||
gulp.task('compileTSTest', function() {
|
||||
var stream = gulp.src('../test.ts')
|
||||
.pipe(gulpTypescript({
|
||||
out: "test.js"
|
||||
}))
|
||||
.pipe(gulp.dest("../../"));
|
||||
return stream;
|
||||
});
|
||||
|
||||
gulp.task('default',['compileTS','compileTSTest'], function() {
|
||||
console.log('Typescript compiled');
|
||||
});
|
Loading…
Reference in New Issue
Block a user