Skip to content

Commit

Permalink
Update svg-typewriter (#3164)
Browse files Browse the repository at this point in the history
* Update svg-typewriter

* Switch to npm package
* Update build scripts
* Use CacheMeasurer everywhere for PERFORMANCE!

* Split npm and browser artifacts

* Fix tests

Be more lenient about string pixel measurements on linux
  • Loading branch information
themadcreator authored Jan 19, 2017
1 parent 5606203 commit 2dd9ef5
Show file tree
Hide file tree
Showing 30 changed files with 14,043 additions and 2,318 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
!plottable.js
!plottable.css
!plottable.min.js
!plottable-npm.js
!plottable-npm.d.ts
25 changes: 18 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function(grunt) {
src: [
"typings/d3/d3.d.ts",
"plottable.d.ts",
"bower_components/svg-typewriter/svgtypewriter.d.ts"
"node_modules/svg-typewriter/build/src/index.d.ts"
],
options: {
compiler: "./node_modules/typescript/bin/tsc"
Expand Down Expand Up @@ -54,19 +54,29 @@ module.exports = function(grunt) {
src: "plottable.js",
objectToExport: "Plottable",
deps: {
"default": ["d3"]
"default": ["d3"],
}
},
npm: {
src: "plottable.js",
dest: "plottable-npm.js",
objectToExport: "Plottable",
deps: {
"default": ["d3", "SVGTypewriter"],
"amd": ["d3", "svg-typewriter"],
"cjs": ["d3", "svg-typewriter"]
}
}
};

var concatConfig = {
header: {
src: ["license_header.txt", "plottable.js"],
src: ["license_header.txt", "plottable.js", "node_modules/svg-typewriter/svg-typewriter.js"],
dest: "plottable.js"
},
svgtypewriter: {
src: ["plottable.js", "./bower_components/svg-typewriter/svgtypewriter.js"],
dest: "plottable.js"
headerNpm: {
src: ["license_header.txt", "plottable-npm.js"],
dest: "plottable-npm.js"
},
typings: {
src: ["plottable.d.ts"],
Expand Down Expand Up @@ -262,7 +272,8 @@ module.exports = function(grunt) {
]);

grunt.registerTask("generateJS", [
"concat:svgtypewriter",
"umd:npm",
"concat:headerNpm",
"umd:all",
"concat:header",
"concat:typings",
Expand Down
51 changes: 0 additions & 51 deletions bower_components/svg-typewriter/.bower.json

This file was deleted.

40 changes: 0 additions & 40 deletions bower_components/svg-typewriter/bower.json

This file was deleted.

212 changes: 0 additions & 212 deletions bower_components/svg-typewriter/svgtypewriter.d.ts

This file was deleted.

Loading

0 comments on commit 2dd9ef5

Please sign in to comment.