node compile taiga-front script
commit
ca950da1d2
|
@ -0,0 +1,2 @@
|
|||
node_modules/
|
||||
tmp/
|
|
@ -0,0 +1,17 @@
|
|||
# Taiga Front #
|
||||
|
||||

|
||||
|
||||
##Installation
|
||||
|
||||
* Clone the repo
|
||||
* Edit your configuration file `dist/js/conf.js`
|
||||
* Expose the `dist` directory under a static file web server
|
||||
|
||||
More information about the different installation methods (production, development, vagrant, docker...) can be found here http://taigaio.github.io/taiga-doc/dist/#_installation_guide.
|
||||
|
||||
## Community ##
|
||||
|
||||
[Taiga has a mailing list](http://groups.google.com/d/forum/taigaio). Feel free to join it and ask any questions you may have.
|
||||
|
||||
To subscribe for announcements of releases, important changes and so on, please follow [@taigaio](https://twitter.com/taigaio) on Twitter.
|
|
@ -0,0 +1,55 @@
|
|||
var Promise = require("bluebird");
|
||||
var fs = require("fs");
|
||||
var delAsync = Promise.promisify(require("del"));
|
||||
var exec = Promise.promisify(require('child_process').exec);
|
||||
var ncp = Promise.promisify(require('ncp').ncp);
|
||||
|
||||
var local = 'tmp';
|
||||
var repo = 'https://github.com/taigaio/taiga-front';
|
||||
|
||||
var params = process.argv.slice(2);
|
||||
|
||||
if (params.length !== 2) {
|
||||
throw "Github user & password rerquired";
|
||||
}
|
||||
|
||||
var action = (function cloneOrPull(){
|
||||
var cloned = fs.existsSync(local);
|
||||
|
||||
if (cloned) {
|
||||
action = 'cd ' + local + ' && git pull';
|
||||
} else {
|
||||
action = 'git clone ' + repo + ' ' + local;
|
||||
}
|
||||
|
||||
return action;
|
||||
}())
|
||||
|
||||
exec(action)
|
||||
.then(function() {
|
||||
//compile taiga
|
||||
return exec('cd ' + local + ' && npm install && bower install && gulp deploy');
|
||||
})
|
||||
.then(function() {
|
||||
//remove old dist
|
||||
return delAsync('dist');
|
||||
})
|
||||
.then(function() {
|
||||
//copy new dist
|
||||
return ncp(local + '/dist/', 'dist');
|
||||
})
|
||||
.then(function() {
|
||||
//get last commit id
|
||||
return exec('cd ' + local + ' && git rev-parse HEAD');
|
||||
})
|
||||
.then(function(lastCommitId) {
|
||||
//commit
|
||||
lastCommitId = lastCommitId[0].trim();
|
||||
|
||||
return exec('git add -A && git commit -am "' + lastCommitId + '"');
|
||||
})
|
||||
.then(function() {
|
||||
//push
|
||||
return exec('git push --repo https://' + params[0] + ':' + params[0] + '@github.com:taigaio/taiga-front-dist.git master');
|
||||
})
|
||||
.done();
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "TaigaIO",
|
||||
"keywords": [
|
||||
"Taiga",
|
||||
"Agile",
|
||||
"Project Management",
|
||||
"Github"
|
||||
],
|
||||
"author": "Kaleidos OpenSource SL",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "AGPL-3.0",
|
||||
"url": "https://github.com/taigaio/taiga-front/blob/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"devDependencies": {
|
||||
"bluebird": "^2.6.4",
|
||||
"del": "^1.1.1",
|
||||
"ncp": "^1.0.1"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue