Skip to content

Commit

Permalink
Publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshvarun committed Aug 18, 2023
1 parent f6147b6 commit b4f9abe
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
.github/
src/
tsconfig.json
webpack.config.js
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# blog-cells
[![Node.js CI](https://github.com/rameshvarun/blog-cells/actions/workflows/node.js.yml/badge.svg)](https://github.com/rameshvarun/blog-cells/actions/workflows/node.js.yml)
[![npm](https://img.shields.io/npm/v/blog-cells)](https://www.npmjs.com/package/blog-cells)

<a href="https://rameshvarun.github.io/blog-cells/">
<p align="center"><img width="400px" src="./screenshot.png"></img></p>
<p align="center">[VIEW DEMO]</p>
</a>

Add interactive code cells to any webpage, similar to [Jupyter](https://jupyter.org/) or [ObservableHQ](https://observablehq.com/). Works with direct HTML editing, static site generators like Jekyll / Hugo, and much more.
Add interactive code cells to any webpage, similar to [Jupyter](https://jupyter.org/) or [ObservableHQ](https://observablehq.com/). Works with direct HTML editing, static site generators like Jekyll / Hugo, and more.

## Quickstart

Expand All @@ -18,11 +19,11 @@ console.log("Hello World!");
</script>

<!-- Import blog-cells after your cells are defined. -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rameshvarun/blog-cells@0.3.0/dist/blog-cells.css" />
<script type="module" src="https://cdn.jsdelivr.net/gh/rameshvarun/blog-cells@0.3.0/dist/blog-cells.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/blog-cells@0.4.1/dist/blog-cells.css" />
<script type="module" src="https://cdn.jsdelivr.net/npm/blog-cells@0.4.1/dist/blog-cells.js"></script>
```

Try it on [CodePen](https://codepen.io/varunramesh/pen/WNYVNQQ) or [JSFiddle](https://jsfiddle.net/varunramesh/o217xpc5/8/).
Try it on [CodePen](https://codepen.io/varunramesh/pen/WNYVNQQ) or [JSFiddle](https://jsfiddle.net/varunramesh/o217xpc5/9/).

## Using `pre` tags instead of `script` tags

Expand All @@ -34,8 +35,6 @@ console.log("&lt;b&gt;HELLO&lt;/b&gt;");
</pre>
```

### Rewrite `script` tags in place

### Integration with static site generator

TODO
Expand Down
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"name": "blog-cells",
"version": "0.3.0",
"version": "0.4.1",
"description": "A tool for turning blog posts into interactive code notebooks.",
"repository": {
"type": "git",
"url": "https://github.com/rameshvarun/blog-cells.git"
},
"homepage": "https://rameshvarun.github.io/blog-cells/",
"devDependencies": {
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
Expand All @@ -13,11 +18,13 @@
"ts-loader": "^9.4.4",
"typescript": "^5.1.3",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
},
"scripts": {
"start": "webpack serve --open --env mode=development",
"build": "rm -rf dist && webpack --mode production",
"build": "rm -rf dist && webpack --env mode=production",
"format": "prettier --write src/*.ts src/*.tsx src/*.css",
"typecheck": "tsc --noEmit"
},
Expand All @@ -28,8 +35,6 @@
"@codemirror/view": "^6.16.0",
"codemirror": "^6.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
"react-dom": "^18.2.0"
}
}

0 comments on commit b4f9abe

Please sign in to comment.