Skip to content

Commit ad50048

Browse files
committed
initial commit
0 parents  commit ad50048

19 files changed

+2497
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
/try
3+
.vscode
4+
/build
5+
*.exe
6+
/dist

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package.json
2+
package-lock.json
3+
pnpm-lock.yaml

.prettierrc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"printWidth": 120,
6+
"tabWidth": 2,
7+
"endOfLine": "auto",
8+
"jsxSingleQuote": true,
9+
"plugins": []
10+
}

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Aurora 🎨 / Core
2+
3+
The C code highlighting engine for the web.
4+
5+
> If you are using React, use [aurora-react](https://github.com/codeAbinash/aurora-react) 🚀.
6+
7+
<!-- ![Aurora](https://codeAbinash.github.io/aurora/images/banner.jpg) -->
8+
9+
## Installation
10+
11+
### Using npm
12+
13+
```bash
14+
npm install aurora-code
15+
```
16+
17+
## Usage
18+
19+
### Highlight using classes (recommended)
20+
21+
```ts
22+
import aurora from '../dist/index.js';
23+
24+
const codeBlock = document.getElementById('code-block');
25+
26+
const code = `
27+
int main() {
28+
return 0;
29+
}
30+
`;
31+
32+
const result = aurora(code);
33+
codeBlock.innerHTML = result;
34+
```
35+
36+
### Highlight using inline styles
37+
38+
```ts
39+
aurora(code);
40+
```
41+
42+
TO be continued...

images/banner.jpg

94.1 KB
Loading

package.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "aurora-code",
3+
"type": "module",
4+
"version": "1.0.1",
5+
"description": "The C code highlighting engine for the web.",
6+
"license": "MIT",
7+
"author": "Abinash Karmakar",
8+
"module": "./dist/index.js",
9+
"homepage": "https://github.com/codeAbinash/aurora",
10+
"main": "./dist/index.umd.cjs",
11+
"types": "./dist/index.d.ts",
12+
"files": [
13+
"dist"
14+
],
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/codeAbinash/aurora.git"
18+
},
19+
"bugs": {
20+
"url": "https://github.com/codeAbinash/aurora/issues"
21+
},
22+
"exports": {
23+
".": {
24+
"import": "./dist/index.js",
25+
"require": "./dist/index.umd.cjs"
26+
},
27+
"./themes/one dark pro" : "./dist/themes/one dark pro.css"
28+
},
29+
"scripts": {
30+
"dev": "vite",
31+
"build": "tsc && vite build",
32+
"preview": "vite preview",
33+
"test": "vitest",
34+
"test-ui": "vitest --ui",
35+
"prettier": "prettier --check .",
36+
"prettier:fix": "prettier --write ."
37+
},
38+
"devDependencies": {
39+
"@types/node": "^20.8.9",
40+
"@vitest/ui": "^0.34.6",
41+
"prettier": "^3.0.3",
42+
"typescript": "^5.2.2",
43+
"vitest": "^0.34.6",
44+
"vite": "^4.4.5",
45+
"vite-plugin-dts": "^3.6.1"
46+
}
47+
}

0 commit comments

Comments
 (0)