mirror of
https://github.com/fazo96/pbs.git
synced 2025-01-27 14:34:19 +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/
|
||||
node_modules/
|
||||
test/
|
||||
lib/
|
||||
*.js
|
||||
!gulpfile.js
|
||||
*.css
|
||||
!src/*.css
|
||||
dist/
|
||||
|
56
README.md
56
README.md
@ -1,52 +1,16 @@
|
||||
# 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
|
||||
2. run `npm install` in the root of the repo, then run `bower install` in `client/` if you need to use the Web GUI
|
||||
3. run `npm run-script build` to compile all files
|
||||
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
|
||||
- can calculate (almost) every info that can be retrieved from the minimum amount of data
|
||||
- can draw a (almost correct and thorough) pert diagram
|
||||
- can (almost) draw a timeline of the project
|
||||
|
||||
## 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
|
||||
|
||||
MIT
|
||||
|
27
gulpfile.js
27
gulpfile.js
@ -1,25 +1,28 @@
|
||||
// Gulp Dependencies
|
||||
var gulp = require('gulp');
|
||||
var gutil = require('gulp-util')
|
||||
var uglify = require('gulp-uglify');
|
||||
var minifyCSS = require('gulp-minify-css');
|
||||
var gulp = require('gulp')
|
||||
var minifyCSS = require('gulp-minify-css')
|
||||
var coffee = require('gulp-coffee')
|
||||
var uglify = require('gulp-uglify')
|
||||
var clean = require('gulp-clean')
|
||||
|
||||
gulp.task('css',function(){
|
||||
return gulp.src('src/*.css')
|
||||
.pipe(minifyCSS())
|
||||
.pipe(gulp.dest('.'))
|
||||
.pipe(minifyCSS())
|
||||
.pipe(gulp.dest('dist/'))
|
||||
})
|
||||
|
||||
gulp.task('coffee',function(){
|
||||
return gulp.src('src/*.coffee')
|
||||
.pipe(coffee({ bare: true }))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('.'))
|
||||
.pipe(coffee({ bare: true }))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest('dist/'))
|
||||
})
|
||||
|
||||
gulp.task('default',['css','coffee'])
|
||||
gulp.task('clean',function(){
|
||||
return gulp.src('dist/*').pipe(clean())
|
||||
})
|
||||
|
||||
gulp.task('watch',function(){
|
||||
gulp.watch('src/*.css',['css'])
|
||||
gulp.watch('src/*.coffee',['coffee'])
|
||||
gulp.watch('src/*.css',['css'])
|
||||
})
|
||||
gulp.task('default',['css','coffee'])
|
||||
|
@ -4,13 +4,13 @@
|
||||
<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>
|
||||
<body>
|
||||
<textarea id="ta" class="form-control"></textarea>
|
||||
<button id="save" class="btn btn-primary">Save</button>
|
||||
<a href="pert.html" class="btn btn-success">view pert</a>
|
||||
<script src="bower_components/jquery/dist/jquery.js"></script>
|
||||
<script src="index.js"></script>
|
||||
<script src="dist/index.js"></script>
|
||||
</body>
|
||||
</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>
|
||||
<title>Pert</title>
|
||||
<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>
|
||||
<body>
|
||||
<script src="bower_components/jquery/dist/jquery.js"></script>
|
||||
@ -12,7 +12,7 @@
|
||||
<div id="pert"></div>
|
||||
<a href="index.html">edit data</a>
|
||||
<!--<div id="timeline"></div>-->
|
||||
<script src="pert.js"></script>
|
||||
<script src="pert-ui.js"></script>
|
||||
<script src="dist/pert.js"></script>
|
||||
<script src="dist/pert-ui.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user