Skip to content

Commit

Permalink
feat(line): add typescript definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Oct 17, 2018
1 parent 790a54c commit cfa6a59
Show file tree
Hide file tree
Showing 41 changed files with 7,827 additions and 7,564 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.idea
*.log*
node_modules
/coverage
coverage
/storybook-static

package-lock.json
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fmt: ##@0 global format code using prettier (js, css, md)
"packages/*/{src,stories,tests}/**/*.js" \
"packages/*/README.md" \
"website/src/**/*.{js,css}" \
"examples/*/src/**/*.{js,css}" \
"examples/*/src/**/*.{js,ts,tsx,css}" \
"README.md"

fmt-check: ##@0 global check if files were all formatted using prettier
Expand All @@ -67,7 +67,7 @@ fmt-check: ##@0 global check if files were all formatted using prettier
"packages/*/README.md" \
"website/src/**/*.{js,css}" \
"storybook/stories/**/*.{js,css}" \
"examples/*/src/**/*.{js,css}" \
"examples/*/src/**/*.{js,ts,tsx,css}" \
"README.md"

test-all: ##@0 global run all checks/tests (packages, website & examples)
Expand Down Expand Up @@ -188,6 +188,7 @@ package-dev-%: ##@1 packages setup package for development, link to website, run
@echo "${YELLOW}Preparing package ${WHITE}${*}${YELLOW} for development${RESET}"
@cd packages/${*} && yarn link
@cd website && yarn link @nivo/${*}
@cd examples/typescript && yarn link @nivo/${*}
@$(MAKE) package-watch-${*}

########################################################################################################################
Expand Down Expand Up @@ -259,6 +260,7 @@ storybook-deploy: ##@3 storybook build and deploy storybook

examples-install: ##@4 examples install all examples dependencies
@$(MAKE) example-install-retro
@$(MAKE) example-install-typescript

example-install-%: ##@4 examples install example dependencies, eg. example-install-retro
@echo "${YELLOW}Installing ${WHITE}${*}${YELLOW} example dependencies${RESET}"
Expand All @@ -270,6 +272,7 @@ example-start-%: ##@4 examples start example in dev mode, eg. example-start-retr

examples-build: ##@4 examples build all examples
@$(MAKE) example-build-retro
@$(MAKE) example-build-typescript

example-build-%: ##@4 examples build an example, eg. example-build-retro
@echo "${YELLOW}Building ${WHITE}${*}${YELLOW} example${RESET}"
Expand Down
21 changes: 0 additions & 21 deletions examples/ts/.gitignore

This file was deleted.

32 changes: 0 additions & 32 deletions examples/ts/src/App.css

This file was deleted.

9 changes: 0 additions & 9 deletions examples/ts/src/App.test.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions examples/ts/src/App.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions examples/ts/src/index.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions examples/ts/src/logo.svg

This file was deleted.

123 changes: 0 additions & 123 deletions examples/ts/src/registerServiceWorker.ts

This file was deleted.

10 changes: 0 additions & 10 deletions examples/ts/tslint.json

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "ts",
"name": "nivo-example-typescript",
"version": "0.1.0",
"private": true,
"dependencies": {
"@nivo/line": "^0.50.0",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-scripts-ts": "3.1.0"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>TypeScript demo | nivo</title>
</head>
<body>
<noscript>
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions examples/typescript/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.App {
text-align: center;
}

.App-header {
background-color: #e25d47;
height: 60px;
padding: 20px;
color: white;
}

.App-title {
font-size: 1.5em;
}

.App-intro {
font-size: large;
}
16 changes: 16 additions & 0 deletions examples/typescript/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import * as React from 'react'
import Line from './components/Line'
import './App.css'

export default class App extends React.Component {
public render() {
return (
<div className="App">
<header className="App-header">
<h1 className="App-title">nivo typescript example</h1>
</header>
<Line />
</div>
)
}
}
Loading

0 comments on commit cfa6a59

Please sign in to comment.