mirror of
https://github.com/fazo96/pbs.git
synced 2025-01-29 14:54:18 +01:00
fixed gulp stuff
This commit is contained in:
parent
84baba27d8
commit
6d71fb62a3
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,8 +1,4 @@
|
|||||||
bower_components/
|
bower_components/
|
||||||
node_modules/
|
node_modules/
|
||||||
test/
|
test/
|
||||||
lib/
|
dist/
|
||||||
*.js
|
|
||||||
!gulpfile.js
|
|
||||||
*.css
|
|
||||||
!src/*.css
|
|
||||||
|
56
README.md
56
README.md
@ -1,52 +1,16 @@
|
|||||||
# Pert
|
# Pert
|
||||||
|
|
||||||
Pert is a command line tool built to assist in the process of creating pert diagrams and calculating permitted delays.
|
Pert is a small web app built to assist in working with Project Breakdown Structures.
|
||||||
|
|
||||||
## Installation
|
It should be accessible [here](http://fazo96.github.io/pert)
|
||||||
|
|
||||||
Make sure you have `node` and `npm` installed and working
|
## Features
|
||||||
|
|
||||||
__From git__
|
It's still in development.
|
||||||
|
|
||||||
1. clone this repo
|
- can calculate (almost) every info that can be retrieved from the minimum amount of data
|
||||||
2. run `npm install` in the root of the repo, then run `bower install` in `client/` if you need to use the Web GUI
|
- can draw a (almost correct and thorough) pert diagram
|
||||||
3. run `npm run-script build` to compile all files
|
- can (almost) draw a timeline of the project
|
||||||
4. the binary should now be in `bin/pert`
|
|
||||||
|
|
||||||
__From npm__
|
|
||||||
|
|
||||||
1. `npm install -g pert`
|
|
||||||
2. run `pert` in your shell
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Usage: pert <command> [options] [args]
|
|
||||||
|
|
||||||
loads activity data from JSON and computes the possible activity delays
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
|
|
||||||
example show an example of the JSON data format
|
|
||||||
calculate|c [options] <file> calculate data on given JSON document
|
|
||||||
graph|g <file> serve HTTP GUI with pert graph of given JSON document
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
-h, --help output usage information
|
|
||||||
-V, --version output the version number
|
|
||||||
-v, --verbose be verbose (for debugging)
|
|
||||||
|
|
||||||
|
|
||||||
This is the help information for the `pert calculate` command:
|
|
||||||
|
|
||||||
Usage: calculate|c [options] <file>
|
|
||||||
|
|
||||||
calculate data on given JSON document
|
|
||||||
|
|
||||||
Options:
|
|
||||||
|
|
||||||
-h, --help output usage information
|
|
||||||
-j, --json output json data
|
|
||||||
|
|
||||||
## Data format
|
## Data format
|
||||||
|
|
||||||
@ -63,12 +27,6 @@ This is a valid input document (extra data is ignored but not thrashed):
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
And this is the output of the `calculate` command on the previous document using the `--json` flag:
|
|
||||||
|
|
||||||
```json
|
|
||||||
[{"id":0,"duration":3,"startDay":0,"endDay":3,"permittedDelay":0},{"id":1,"duration":1,"startDay":0,"endDay":1,"permittedDelay":0},{"id":2,"duration":2,"depends":[0],"startDay":3,"endDay":5,"permittedDelay":1},{"id":3,"duration":5,"depends":[1],"startDay":1,"endDay":6,"permittedDelay":0},{"id":4,"duration":5,"depends":[1],"startDay":1,"endDay":6,"permittedDelay":0},{"id":5,"duration":2,"depends":[2,3,4],"startDay":6,"endDay":8}]
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
27
gulpfile.js
27
gulpfile.js
@ -1,25 +1,28 @@
|
|||||||
// Gulp Dependencies
|
var gulp = require('gulp')
|
||||||
var gulp = require('gulp');
|
var minifyCSS = require('gulp-minify-css')
|
||||||
var gutil = require('gulp-util')
|
|
||||||
var uglify = require('gulp-uglify');
|
|
||||||
var minifyCSS = require('gulp-minify-css');
|
|
||||||
var coffee = require('gulp-coffee')
|
var coffee = require('gulp-coffee')
|
||||||
|
var uglify = require('gulp-uglify')
|
||||||
|
var clean = require('gulp-clean')
|
||||||
|
|
||||||
gulp.task('css',function(){
|
gulp.task('css',function(){
|
||||||
return gulp.src('src/*.css')
|
return gulp.src('src/*.css')
|
||||||
.pipe(minifyCSS())
|
.pipe(minifyCSS())
|
||||||
.pipe(gulp.dest('.'))
|
.pipe(gulp.dest('dist/'))
|
||||||
})
|
})
|
||||||
|
|
||||||
gulp.task('coffee',function(){
|
gulp.task('coffee',function(){
|
||||||
return gulp.src('src/*.coffee')
|
return gulp.src('src/*.coffee')
|
||||||
.pipe(coffee({ bare: true }))
|
.pipe(coffee({ bare: true }))
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.pipe(gulp.dest('.'))
|
.pipe(gulp.dest('dist/'))
|
||||||
})
|
})
|
||||||
|
|
||||||
gulp.task('default',['css','coffee'])
|
gulp.task('clean',function(){
|
||||||
|
return gulp.src('dist/*').pipe(clean())
|
||||||
|
})
|
||||||
|
|
||||||
gulp.task('watch',function(){
|
gulp.task('watch',function(){
|
||||||
gulp.watch('src/*.css',['css'])
|
|
||||||
gulp.watch('src/*.coffee',['coffee'])
|
gulp.watch('src/*.coffee',['coffee'])
|
||||||
|
gulp.watch('src/*.css',['css'])
|
||||||
})
|
})
|
||||||
|
gulp.task('default',['css','coffee'])
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
<title>Pert</title>
|
<title>Pert</title>
|
||||||
<link rel="stylesheet" href="bower_components/vis/dist/vis.min.css">
|
<link rel="stylesheet" href="bower_components/vis/dist/vis.min.css">
|
||||||
<link rel="stylesheet" href="bower_components/vis/dist/vis.min.css">
|
<link rel="stylesheet" href="bower_components/vis/dist/vis.min.css">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="dist/style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<textarea id="ta" class="form-control"></textarea>
|
<textarea id="ta" class="form-control"></textarea>
|
||||||
<button id="save" class="btn btn-primary">Save</button>
|
<button id="save" class="btn btn-primary">Save</button>
|
||||||
<a href="pert.html" class="btn btn-success">view pert</a>
|
<a href="pert.html" class="btn btn-success">view pert</a>
|
||||||
<script src="bower_components/jquery/dist/jquery.js"></script>
|
<script src="bower_components/jquery/dist/jquery.js"></script>
|
||||||
<script src="index.js"></script>
|
<script src="dist/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
19
package.json
Normal file
19
package.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "pert",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"devDependencies": {
|
||||||
|
"gulp": "^3.8.11",
|
||||||
|
"gulp-clean": "^0.3.1",
|
||||||
|
"gulp-coffee": "^2.3.1",
|
||||||
|
"gulp-minify-css": "^1.0.0",
|
||||||
|
"gulp-uglify": "^1.1.0"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/fazo96/pert.git"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/fazo96/pert/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/fazo96/pert"
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Pert</title>
|
<title>Pert</title>
|
||||||
<link rel="stylesheet" href="bower_components/vis/dist/vis.min.css">
|
<link rel="stylesheet" href="bower_components/vis/dist/vis.min.css">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="dist/style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="bower_components/jquery/dist/jquery.js"></script>
|
<script src="bower_components/jquery/dist/jquery.js"></script>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<div id="pert"></div>
|
<div id="pert"></div>
|
||||||
<a href="index.html">edit data</a>
|
<a href="index.html">edit data</a>
|
||||||
<!--<div id="timeline"></div>-->
|
<!--<div id="timeline"></div>-->
|
||||||
<script src="pert.js"></script>
|
<script src="dist/pert.js"></script>
|
||||||
<script src="pert-ui.js"></script>
|
<script src="dist/pert-ui.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user