d3-flame-graph
Advanced tools
Comparing version 1.0.11 to 2.0.0-alpha1
@@ -1,50 +0,63 @@ | ||
var gulp = require('gulp'), | ||
uglify = require('gulp-uglify'), | ||
concat = require('gulp-concat'), | ||
notify = require("gulp-notify"), | ||
rename = require('gulp-rename'), | ||
jshint = require('gulp-jshint'), | ||
minifycss = require('gulp-minify-css'), | ||
del = require('del'), | ||
browserSync = require('browser-sync').create(); | ||
var gulp = require('gulp') | ||
var rollup = require('rollup-stream') | ||
var source = require('vinyl-source-stream') | ||
var uglify = require('gulp-uglify-es').default | ||
var del = require('del') | ||
var rename = require('gulp-rename') | ||
var eslint = require('gulp-eslint') | ||
var browserSync = require('browser-sync').create() | ||
gulp.task('clean', function() { | ||
del(['dist']) | ||
}); | ||
gulp.task('clean', function () { | ||
return del(['dist']) | ||
}) | ||
gulp.task('lint', function() { | ||
return gulp.src('./src/**/*.js') | ||
.pipe(jshint()) | ||
.pipe(jshint.reporter('jshint-stylish')); | ||
}); | ||
gulp.task('lint', function () { | ||
return gulp.src(['./src/**/*.js']) | ||
.pipe(eslint()) | ||
.pipe(eslint.format()) | ||
.pipe(eslint.failAfterError()) | ||
}) | ||
gulp.task('scripts', ['lint'], function() { | ||
return gulp.src('src/**/*.js') | ||
.pipe(concat('d3.flameGraph.js')) | ||
.pipe(gulp.dest('dist')) | ||
gulp.task('rollup', function () { | ||
return rollup('rollup.config.js') | ||
.pipe(source('d3-flamegraph.js')) | ||
.pipe(gulp.dest('./dist')) | ||
}) | ||
gulp.task('uglify', function () { | ||
return gulp.src('./dist/d3-flamegraph.js') | ||
.pipe(gulp.dest('./dist')) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(uglify()) | ||
.pipe(gulp.dest('dist')) | ||
.pipe(notify({ message: 'Scripts task complete.' })); | ||
}); | ||
.pipe(gulp.dest('./dist')) | ||
}) | ||
gulp.task('styles', function() { | ||
return gulp.src('src/**/*.css', { style: 'expanded' }) | ||
.pipe(gulp.dest('dist')) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(minifycss()) | ||
.pipe(gulp.dest('dist')) | ||
.pipe(notify({ message: 'Styles task complete' })); | ||
}); | ||
gulp.task('style', function () { | ||
return gulp.src('./src/flamegraph.css') | ||
.pipe(rename('d3-flamegraph.css')) | ||
.pipe(gulp.dest('./dist')) | ||
}) | ||
gulp.task('dist', ['clean', 'scripts', 'styles']); | ||
gulp.task('rollup-watch', gulp.series('rollup', function (done) { | ||
browserSync.reload() | ||
done() | ||
})) | ||
gulp.task('browser-sync', function() { | ||
browserSync.init({ | ||
server: { | ||
baseDir: ['example', 'src', 'bower_components'] | ||
} | ||
}); | ||
}); | ||
gulp.task('style-watch', gulp.series('style', function (done) { | ||
browserSync.reload() | ||
done() | ||
})) | ||
gulp.task('default', ['browser-sync']); | ||
gulp.task('serve', gulp.series('lint', 'rollup', 'style', function () { | ||
browserSync.init({ | ||
server: { | ||
baseDir: ['examples', 'dist'] | ||
} | ||
}) | ||
gulp.watch('./src/*.js', gulp.series('rollup-watch')) | ||
gulp.watch('./src/*.css', gulp.series('style-watch')) | ||
})) | ||
gulp.task('build', gulp.series('clean', 'lint', 'rollup', 'uglify', 'style')) | ||
gulp.task('default', gulp.series('serve')) |
{ | ||
"name": "d3-flame-graph", | ||
"version": "1.0.11", | ||
"version": "2.0.0-alpha1", | ||
"description": "A d3.js library to produce flame graphs.", | ||
"main": "src/d3.flameGraph.js", | ||
"main": "dist/d3-flamegraph.js", | ||
"directories": { | ||
@@ -10,4 +10,6 @@ "example": "example" | ||
"scripts": { | ||
"test": "mocha --reporter nyan", | ||
"dist": "gulp dist && git add src/*" | ||
"pretest": "gulp build", | ||
"test": "tape 'test/**/*-test.js'", | ||
"prepare": "npm run test", | ||
"postpublish": "zip -j dist/d3-heatmap2.zip -- LICENSE README.md dist/d3-flamegraph.js dist/d3-flamegraph.min.js dist/d3-flamegraph.css" | ||
}, | ||
@@ -19,8 +21,8 @@ "repository": { | ||
"keywords": [ | ||
"d3", | ||
"d3-module", | ||
"flame", | ||
"graph", | ||
"flamegraph", | ||
"performance", | ||
"d3", | ||
"d3js" | ||
"performance" | ||
], | ||
@@ -34,24 +36,23 @@ "author": "Martin Spier <spiermar@gmail.com>", | ||
"devDependencies": { | ||
"browser-sync": "^2.18.13", | ||
"browserify": "^14.4.0", | ||
"browser-sync": "^2.23.6", | ||
"del": "^3.0.0", | ||
"gulp": "^3.9.1", | ||
"gulp-concat": "^2.6.1", | ||
"gulp-jshint": "^2.0.4", | ||
"gulp-minify-css": "^1.2.4", | ||
"gulp-notify": "^3.0.0", | ||
"eslint-config-standard": "^11.0.0-beta.0", | ||
"eslint-plugin-import": "^2.8.0", | ||
"eslint-plugin-node": "^6.0.0", | ||
"eslint-plugin-promise": "^3.6.0", | ||
"eslint-plugin-standard": "^3.0.1", | ||
"gulp": "^4.0.0", | ||
"gulp-eslint": "^4.0.2", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-uglify": "^3.0.0", | ||
"jshint": "^2.9.5", | ||
"jshint-stylish": "^2.2.1", | ||
"mocha": "^3.5.0" | ||
"gulp-uglify-es": "^1.0.1", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-stream": "^1.24.1", | ||
"tape": "4", | ||
"uglify-es": "^3.3.9", | ||
"vinyl-source-stream": "^2.0.0" | ||
}, | ||
"dependencies": { | ||
"d3": "^4.10.0", | ||
"d3-tip": "^0.7.1", | ||
"graceful-fs": "^4.1.11" | ||
}, | ||
"pre-commit": [ | ||
"dist" | ||
] | ||
"d3-tip": "^0.7.1" | ||
} | ||
} |
@@ -107,3 +107,3 @@ # d3-flame-graph | ||
JSON format can be converted from the folded stack format using the [stacko](https://github.com/spiermar/stacko) CLI tool. | ||
JSON format can be converted from the folded stack format using the [burn](https://github.com/spiermar/burn) CLI tool. | ||
@@ -224,2 +224,19 @@ ## Interacting with entries | ||
<a name="inverted" href="#inverted">#</a> flameGraph.<b>inverted</b>(<i>[inverted]</i>) | ||
Invert the flame graph direction. A top-down visualization of the flame graph, also known as _icicle_ plot. Defaults to <i>false</i> if not set. If a value is specified, it will enable/disable the inverted flame graphs direction, otherwise it will return the flameGraph object. | ||
<a name="color" href="#color">#</a> flameGraph.<b>color</b>(<i>[function]</i>) | ||
Replaces the built-in node color hash function. Function should take a single argument, the node data structure, and returns a color string. Example: | ||
```js | ||
// Purple if highlighted, otherwise a static blue. | ||
flameGraph.color(function(d) { | ||
return d.highlight ? "#E600E6" : "#0A5BC4"; | ||
}); | ||
``` | ||
If called with no arguments, `color` will return the flameGraph object. | ||
## Issues | ||
@@ -226,0 +243,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
2
275
11173529
16
20
4610
2
1
- Removedgraceful-fs@^4.1.11
- Removedgraceful-fs@4.2.11(transitive)