New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redo repo #42
Redo repo #42
Changes from 3 commits
c501c2b
d662648
aef0219
aaaeaf2
6c2dc77
e68faee
8ec94d4
3aa6f12
e28a4a6
d25174f
a6dd66f
b51dfdc
70400b9
9c71190
0fd2405
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
check: | ||
each: | ||
statements: 90 | ||
lines: 90 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
build/ | ||
bower_components/ | ||
docs/ | ||
src/ | ||
test/ | ||
typings/ | ||
bower.json | ||
coverage/ | ||
circle.yml | ||
Gruntfile.js | ||
index.html | ||
index.js | ||
license_header.txt | ||
tsd.json | ||
tslint.json | ||
|
||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,17 @@ | |
"main": "build/src/index.js", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so i think the build dir is gitignored but NOT npmignored. I think that means it'll be included when we run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, we'll have to make sure we run |
||
"types": "build/src/index.d.ts", | ||
"buildPath": "build", | ||
"testsGlob": "build/test/*Tests.js", | ||
"scripts": { | ||
"build": "npm-run-all build:clean build:compile build:namespace", | ||
"build:clean": "rimraf ${npm_package_buildPath}", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is rimraf better than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"build:compile": "tsc --project .", | ||
"build:namespace": "echo \"\\nexport as namespace SVGTypewriter;\" >> ${npm_package_types}", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whoa what is export as namespace? Is this some crazy Typescript magic that converts a module into a namespace?! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"docs": "typedoc -out docs src", | ||
"lint:ts": "tslint src/**/*.ts test/**/*.ts", | ||
"test": "npm-run-all build lint:ts test:mocha", | ||
"test:mocha": "mochify --reporter spec ${npm_package_buildPath}/test/**/*Tests.js" | ||
"test": "npm-run-all build lint:ts test:mocha test:coverage", | ||
"test:mocha": "mochify --reporter spec --plugin [ mochify-istanbul --report text --report json --dir coverage --exclude '**/test/**/*' ] ${npm_package_testsGlob}", | ||
"test:coverage": "istanbul check-coverage" | ||
}, | ||
"keywords": [ | ||
"svg", | ||
|
@@ -25,19 +27,21 @@ | |
"dependencies": { | ||
"@types/d3": "3.5.36", | ||
"@types/es6-shim": "^0.31.32", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd peg |
||
"d3": "3.5.16", | ||
"tslint": "^4.3.1" | ||
"d3": "3.5.16" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the other hand, we shouldn't peg our actual code dependencies to a specific version. Is there a reason why we specifically need d3 3.5.16 vs any other version? I think ^3.5.0 is good |
||
}, | ||
"devDependencies": { | ||
"@types/chai": "3.4.34", | ||
"@types/mocha": "2.2.33", | ||
"@types/node": "^6.0.52", | ||
"chai": "3.5.0", | ||
"istanbul": "^0.4.5", | ||
"mocha": "3.2.0", | ||
"mochify-istanbul": "^2.4.1", | ||
"mochify": "2.18.1", | ||
"npm-run-all": "3.1.2", | ||
"phantomjs-prebuilt": "2.1.14", | ||
"rimraf": "2.5.4", | ||
"tslint": "^4.3.1", | ||
"typedoc": "^0.5.3", | ||
"typescript": "2.1.4" | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
/** | ||
* Copyright 2017-present Palantir Technologies, Inc. All rights reserved. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (probably a separate PR) you could use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went ahead and added that. Pretty simple |
||
* Licensed under the MIT License (the "License"); you may obtain a copy of the | ||
* license at https://github.com/palantir/svg-typewriter/blob/develop/LICENSE | ||
*/ | ||
|
||
import * as d3 from "d3"; | ||
|
||
export class BaseAnimator { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are the big pros/cons of re-exporting in index vs. consumers doing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. re-exporting is better; it allows you to reduce your API surface area. if consumers have to know about the folder structure to import symbols, then that becomes part of your public API. |
||
* Copyright 2017-present Palantir Technologies, Inc. All rights reserved. | ||
* Licensed under the MIT License (the "License"); you may obtain a copy of the | ||
* license at https://github.com/palantir/svg-typewriter/blob/develop/LICENSE | ||
*/ | ||
|
||
export * from "./baseAnimator"; | ||
export * from "./opacityAnimator"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/** | ||
* Copyright 2017-present Palantir Technologies, Inc. All rights reserved. | ||
* Licensed under the MIT License (the "License"); you may obtain a copy of the | ||
* license at https://github.com/palantir/svg-typewriter/blob/develop/LICENSE | ||
*/ | ||
|
||
export * from "./singleLineWrapper"; | ||
export * from "./wrapper"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
/** | ||
* Copyright 2017-present Palantir Technologies, Inc. All rights reserved. | ||
* Licensed under the MIT License (the "License"); you may obtain a copy of the | ||
* license at https://github.com/palantir/svg-typewriter/blob/develop/LICENSE | ||
*/ | ||
|
||
export * from "./writer"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
/** | ||
* Copyright 2017-present Palantir Technologies, Inc. All rights reserved. | ||
* Licensed under the MIT License (the "License"); you may obtain a copy of the | ||
* license at https://github.com/palantir/svg-typewriter/blob/develop/LICENSE | ||
*/ | ||
|
||
/// <reference types="mocha"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. our tests still need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Turns out no, will remove |
||
import { assert } from "chai"; | ||
import * as SVGTypewriter from "../../src"; | ||
import { generateSVG } from "../utils"; | ||
import * as SVGTypewriter from "../src"; | ||
import { generateSVG } from "./utils"; | ||
|
||
describe("Utils.DOM Test Suite", () => { | ||
const domUtils = SVGTypewriter.Utils.DOM; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we now include these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all
*.yml
files are now ignored.it would be safer to write this file like https://github.com/palantir/plottable/blob/develop/.npmignore, which whitelists files in the package rather than blacklists them, but we don't do that consistently everywhere (blueprint doesn't do it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nice