Skip to content

Commit 7d41f74

Browse files
committed
2 parents 039218e + bd98051 commit 7d41f74

File tree

7 files changed

+62
-2
lines changed

7 files changed

+62
-2
lines changed

.github/workflows/node.js.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [10.x, 12.x, 14.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
- run: npm run build
29+
- run: npm test

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22

33
Recreatiing the essential part of [Dnotebook](https://playnotebook.jsdata.org/) using react. See old repo [here](https://github.com/opensource9ja/dnotebook)
44

5-
Disclaimer: UI is not fancy (no css is used for now).
6-
75
## Component Structure
86
Cell.js --> Contains all operation pertaining to a cell block
97

108
App.js --> Manage all cells block and general operations like Downloading and Uploading of Notebook
119

1210
Index.js --> Renders the App.
1311

12+
## To contribute
13+
14+
1. Clone the repository
15+
2. cd into the clone repository
16+
3. run `yarn`
17+
4. To start the web page: `yarn start` and go to `localhost:3000` to see the webpage
18+

craco.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
style: {
3+
postcss: {
4+
plugins: [require("tailwindcss"), require("autoprefixer")],
5+
},
6+
},
7+
};

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"@craco/craco": "^6.0.0",
7+
"@tailwindcss/postcss7-compat": "^2.0.2",
68
"@testing-library/jest-dom": "^5.11.5",
79
"@testing-library/react": "^11.1.1",
810
"@testing-library/user-event": "^12.2.0",
911
"blob-polyfill": "^5.0.20210201",
12+
"autoprefixer": "^9",
1013
"codemirror": "^5.58.2",
14+
"postcss": "^7",
1115
"react": "^17.0.1",
1216
"react-codemirror": "^1.0.0",
1317
"react-codemirror2": "^7.2.1",
@@ -19,6 +23,7 @@
1923
"remarkable": "^2.0.1",
2024
"remarkable-react": "^1.4.3",
2125
"styled-components": "^5.2.1",
26+
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
2227
"web-vitals": "^0.2.4"
2328
},
2429
"scripts": {

public/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
content="Web site created using create-react-app"
1111
/>
1212
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
14+
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
1315
<!--
1416
manifest.json provides metadata used when your web app is installed on a
1517
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/

src/Cell.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export default function Cell({
105105
refCode.current.style.display = cell.input ? "none" : "block";
106106
} else {
107107
refCode.current.getCodeMirror().setValue(cell.input);
108+
refCode.current.getCodeMirror().setSize("100%", "auto");
108109
refOutput.current.innerHTML = cell.output;
109110
}
110111
// eslint-disable-next-line radix

tailwind.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
purge: ["./src/**/*.{js,jsx,ts,tsx}", "./public/index.html"],
3+
darkMode: false, // or 'media' or 'class'
4+
theme: {
5+
extend: {},
6+
},
7+
variants: {
8+
extend: {},
9+
},
10+
plugins: [],
11+
};

0 commit comments

Comments
 (0)