Skip to content

Commit

Permalink
Rename back to regex-colorizer
Browse files Browse the repository at this point in the history
  • Loading branch information
slevithan committed Aug 18, 2024
1 parent b066bfb commit 1258fb0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ Errors are highlighted, along with some edge cases that can cause cross-browser

## Demo

Try it out on the [**demo page**](https://slevithan.github.io/regexcolorizer/demo/), which also includes more details.
Try it out on the [**demo page**](https://slevithan.github.io/regex-colorizer/demo/), which also includes more details.

## Install and use

```sh
npm install regexcolorizer
npm install regex-colorizer
```

```js
import {colorizeAll, colorizePattern, loadStyles} from 'regexcolorizer';
import {colorizeAll, colorizePattern, loadStyles} from 'regex-colorizer';
```

In browsers (using a global name):

```html
<script src="https://cdn.jsdelivr.net/npm/regexcolorizer@1.0.1/dist/regexcolorizer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/regex-colorizer@1.0.1/dist/regex-colorizer.min.js"></script>
<script>
const {colorizeAll, colorizePattern, loadStyles} = RegexColorizer;
</script>
Expand All @@ -36,7 +36,7 @@ Several themes are available as stylesheets, but you don't need to add a stylesh
## Usage

```js
import {colorizeAll, colorizePattern, loadStyles} from 'regexcolorizer';
import {colorizeAll, colorizePattern, loadStyles} from 'regex-colorizer';
// Or, if using the browser bundle:
// const {colorizeAll, colorizePattern, loadStyles} = RegexColorizer;

Expand Down
8 changes: 4 additions & 4 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div id="content">
<h1>
Regex Colorizer
<a href="https://github.com/slevithan/regexcolorizer">
<a href="https://github.com/slevithan/regex-colorizer">
<img src="https://upload.wikimedia.org/wikipedia/commons/c/c2/GitHub_Invertocat_Logo.svg" width="25" height="25" alt="GitHub">
</a>
</h1>
Expand Down Expand Up @@ -96,7 +96,7 @@ <h3>Octals and backreferences</h3>

<h2>Usage</h2>
<p>Here's how to highlight all your regexes like you can see running on this page:</p>
<pre><code class="language-javascript">import {colorizeAll, colorizePattern, loadStyles} from 'regexcolorizer';
<pre><code class="language-javascript">import {colorizeAll, colorizePattern, loadStyles} from 'regex-colorizer';
// Or, if using the browser bundle:
// const {colorizeAll, colorizePattern, loadStyles} = RegexColorizer;

Expand Down Expand Up @@ -146,7 +146,7 @@ <h2>Usage</h2>
<footer>
<p>
&copy; 2010&ndash;2024 Steven Levithan |
<a href="https://github.com/slevithan/regexcolorizer">
<a href="https://github.com/slevithan/regex-colorizer">
<img src="https://upload.wikimedia.org/wikipedia/commons/c/c2/GitHub_Invertocat_Logo.svg" width="15" height="15" alt="GitHub">
</a> |
<a href="https://github.com/slevithan/awesome-regex">Awesome Regex</a> |
Expand All @@ -157,7 +157,7 @@ <h2>Usage</h2>
</footer>
</div>

<script src="../dist/regexcolorizer.min.js"></script>
<script src="../dist/regex-colorizer.min.js"></script>
<script>
RegexColorizer.colorizeAll();

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "regexcolorizer",
"name": "regex-colorizer",
"version": "1.0.1",
"description": "Highlight regex syntax",
"homepage": "https://slevithan.github.io/regexcolorizer/demo/",
"homepage": "https://slevithan.github.io/regex-colorizer/demo/",
"author": "Steven Levithan",
"license": "MIT",
"type": "module",
"exports": "./src/index.js",
"browser": "./dist/regexcolorizer.min.js",
"browser": "./dist/regex-colorizer.min.js",
"scripts": {
"prebuild": "rimraf --glob dist/*",
"build": "esbuild src/index.js --bundle --minify --outfile=dist/regexcolorizer.min.js --global-name=RegexColorizer",
"build": "esbuild src/index.js --bundle --minify --outfile=dist/regex-colorizer.min.js --global-name=RegexColorizer",
"test": "echo \"Error: no test specified\" && exit 1",
"prepare": "npm run build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/slevithan/regexcolorizer.git"
"url": "git+https://github.com/slevithan/regex-colorizer.git"
},
"keywords": [
"regex",
Expand Down

0 comments on commit 1258fb0

Please sign in to comment.