Skip to content
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

add stylin #103

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions ReadmeSrc/scripts/fetchData.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const delay = require('delay')
const data = require('../../webpage/src/data.json')

// https://github.com/settings/tokens
const access_token = process.env.GITHUB_TOKEN
const config = {
headers: { Authorization: `token ${process.env.GITHUB_TOKEN}` }
}

async function getPackagesData() {
return Promise.all(data.rows.map(getPackageData))
Expand Down Expand Up @@ -48,13 +50,14 @@ const getNpmDownloads = npm =>
const getIssueCount = (github, state) =>
axios
.get(
`https://api.github.com/search/issues?access_token=${access_token}&q=repo:${github}+type:issue+state:${state}`
`https://api.github.com/search/issues?q=repo:${github}+type:issue+state:${state}`,
config
)
.then(response => response.data.total_count)

const getGithubRepoStats = github =>
axios
.get(`https://api.github.com/repos/${github}?access_token=${access_token}`)
.get(`https://api.github.com/repos/${github}`, config)
.then(response => response.data)

async function getGithubStats(github) {
Expand Down
11 changes: 11 additions & 0 deletions stylin/button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { render } from 'react-dom';
import {Container, Button} from './styles.scss';

const App = () => (
<Container>
<Button>Click me!</Button>
</Container>
);

render(<App />, document.getElementById('content'));
10 changes: 10 additions & 0 deletions stylin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>Stylin - CSS in JS</title>
</head>
<body>
<div id="content"></div>
<script src="bundle.js"></script>
</body>
</html>
Loading