Skip to content

Commit 1eec5fc

Browse files
author
William Troup
authored
Merge pull request #46 from williamtroup/3.0.0
3.0.0
2 parents 937560c + 11c998a commit 1eec5fc

131 files changed

Lines changed: 7895 additions & 3863 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
/.vscode
33
.DS_Store
44
*.nupkg
5+
/build
6+
/node_modules

.npmignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/.github
2+
/.vscode
3+
/test
4+
/build
5+
CODE_OF_CONDUCT.md
6+
CONTRIBUTING.md
7+
syntax.js.nuspec
8+
PACK.sh
9+
PUBLISH.sh
10+
README_NUGET.md
11+
SECURITY.md
12+
SERVE.sh
13+
package-lock.json
14+
tsconfig.json
15+
tsup.build.config.ts
16+
tsup.build.esm.config.ts
17+
tsup.build.min.config.ts
18+
BUILD_INSTRUCTIONS.md
19+
*.nupkg

BUILD_INSTRUCTIONS.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Building Syntax.js
2+
3+
Before getting started with Syntax.js, please read through the following instructions:
4+
5+
6+
## Step 1: Install Packages:
7+
8+
Install the packages using the following NPM commands:
9+
10+
### 1. Install TypeScript:
11+
12+
```markdown
13+
npm install -g typescript
14+
```
15+
16+
### 2. Install tsup:
17+
18+
```markdown
19+
npm i tsup -D
20+
```
21+
22+
### 3. Install terser:
23+
24+
```markdown
25+
npm install terser -D
26+
```
27+
28+
### 4. Install swc/core (if ES5 is required):
29+
30+
```markdown
31+
npm install @swc/core -D
32+
```
33+
34+
35+
## Step 2: Build Project:
36+
37+
### 1. Full Build:
38+
39+
To build the TypeScript, run the following command:
40+
41+
```markdown
42+
npm run build-typescript
43+
```
44+
45+
To build the SASS, run the following command:
46+
47+
```markdown
48+
npm run build-sass
49+
```
50+
51+
To build the everything, run the following command:
52+
53+
```markdown
54+
npm run build
55+
```
56+
57+
### 2. Minimized Build:
58+
59+
To build the TypeScript, run the following command:
60+
61+
```markdown
62+
npm run build-minimized-typescript
63+
```
64+
65+
To build the SASS, run the following command:
66+
67+
```markdown
68+
npm run build-minimized-sass
69+
```
70+
71+
To build the everything, run the following command:
72+
73+
```markdown
74+
npm run build-minimized
75+
```
76+
77+
### 3. ESM Build:
78+
79+
To build the TypeScript, run the following command:
80+
81+
```markdown
82+
npm run build-typescript-esm
83+
```

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
Syntax.js
33

44
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Syntax.js%2C%20a%20free%20JavaScript%20syntax%20highlighter&url=https://github.com/williamtroup/Syntax.js&hashtags=javascript,syntax,highlighter)
5-
[![npm](https://img.shields.io/badge/npmjs-v2.6.0-blue)](https://www.npmjs.com/package/jsyntax.js)
6-
[![nuget](https://img.shields.io/badge/nuget-v2.6.0-purple)](https://www.nuget.org/packages/jSyntax.js/)
5+
[![npm](https://img.shields.io/badge/npmjs-v3.0.0-blue)](https://www.npmjs.com/package/jsyntax.js)
6+
[![nuget](https://img.shields.io/badge/nuget-v3.0.0-purple)](https://www.nuget.org/packages/jSyntax.js/)
77
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Syntax.js/blob/main/LICENSE.txt)
88
[![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Syntax.js/discussions)
99
[![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://www.william-troup.com/)
1010
</h1>
1111

1212
> <p align="center">A lightweight, and easy-to-use, JavaScript library for code syntax highlighting!</p>
13-
> <p align="center">v2.6.0</p>
13+
> <p align="center">v3.0.0</p>
1414
<br />
1515
1616
![Syntax.js](docs/images/main.png)
@@ -22,6 +22,7 @@ Syntax.js
2222
<h1>What features does Syntax.js have?</h1>
2323

2424
- Zero-dependencies and extremely lightweight!
25+
- Written in TypeScript, allowing greater support for React, Angular, and other libraries!
2526
- Highlights keywords, values, strings, and comments.
2627
- 51 language translations available!
2728
- Full API available via public functions.
@@ -158,6 +159,13 @@ npm install jsyntax.js
158159
```
159160

160161
Or, you can download the latest zipped up version [here](https://www.william-troup.com/syntax-js/download.html).
162+
163+
Or, you can also use the following CDN links:
164+
165+
```markdown
166+
https://cdn.jsdelivr.net/gh/williamtroup/Syntax.js@3.0.0/dist/syntax.min.js
167+
https://cdn.jsdelivr.net/gh/williamtroup/Syntax.js@3.0.0/dist/syntax.js.min.css
168+
```
161169
<br>
162170
<br>
163171

README_NUGET.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Syntax.js v2.6.0
1+
# Syntax.js v3.0.0
22

33
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Syntax.js%2C%20a%20free%20JavaScript%20syntax%20highlighter&url=https://github.com/williamtroup/Syntax.js&hashtags=javascript,syntax,highlighter)
4-
[![npm](https://img.shields.io/badge/npmjs-v2.6.0-blue)](https://www.npmjs.com/package/jsyntax.js)
5-
[![nuget](https://img.shields.io/badge/nuget-v2.6.0-purple)](https://www.nuget.org/packages/jSyntax.js/)
4+
[![npm](https://img.shields.io/badge/npmjs-v3.0.0-blue)](https://www.npmjs.com/package/jsyntax.js)
5+
[![nuget](https://img.shields.io/badge/nuget-v3.0.0-purple)](https://www.nuget.org/packages/jSyntax.js/)
66
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Syntax.js/blob/main/LICENSE.txt)
77
[![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Syntax.js/discussions)
88
[![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://www.william-troup.com/)
@@ -13,6 +13,7 @@
1313
## What features does Syntax.js have?
1414

1515
- Zero-dependencies and extremely lightweight!
16+
- Written in TypeScript, allowing greater support for React, Angular, and other libraries!
1617
- Highlights keywords, values, strings, and comments.
1718
- 51 language translations available!
1819
- Full API available via public functions.
@@ -138,6 +139,13 @@ npm install jsyntax.js
138139

139140
Or, you can download the latest zipped up version [here](https://www.william-troup.com/syntax-js/download.html).
140141

142+
Or, you can also use the following CDN links:
143+
144+
```markdown
145+
https://cdn.jsdelivr.net/gh/williamtroup/Syntax.js@3.0.0/dist/syntax.min.js
146+
https://cdn.jsdelivr.net/gh/williamtroup/Syntax.js@3.0.0/dist/syntax.js.min.css
147+
```
148+
141149

142150
## How do I get started?
143151

dist/languages/syntax.bash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Syntax.js v2.6.0 | (c) Bunoon 2024 | MIT License */
1+
/*! Syntax.js v3.0.0 | (c) Bunoon 2024 | MIT License */
22
$syntax.addLanguage( "bash", {
33
friendlyName: "Bash",
44
keywords: [

dist/languages/syntax.c-plus-plus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Syntax.js v2.6.0 | (c) Bunoon 2024 | MIT License */
1+
/*! Syntax.js v3.0.0 | (c) Bunoon 2024 | MIT License */
22
$syntax.addLanguage( "c-plus-plus", {
33
friendlyName: "C++",
44
keywords: [

dist/languages/syntax.c-sharp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Syntax.js v2.6.0 | (c) Bunoon 2024 | MIT License */
1+
/*! Syntax.js v3.0.0 | (c) Bunoon 2024 | MIT License */
22
$syntax.addLanguage( "c-sharp", {
33
friendlyName: "C#",
44
keywords: [

dist/languages/syntax.c.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Syntax.js v2.6.0 | (c) Bunoon 2024 | MIT License */
1+
/*! Syntax.js v3.0.0 | (c) Bunoon 2024 | MIT License */
22
$syntax.addLanguage( "c", {
33
friendlyName: "C",
44
keywords: [

dist/languages/syntax.css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Syntax.js v2.6.0 | (c) Bunoon 2024 | MIT License */
1+
/*! Syntax.js v3.0.0 | (c) Bunoon 2024 | MIT License */
22
$syntax.addLanguage( "css", {
33
friendlyName: "CSS",
44
keywords: [

0 commit comments

Comments
 (0)