Skip to content

Commit 178100a

Browse files
committed
update package name
1 parent 6714f18 commit 178100a

15 files changed

+40
-40
lines changed

README.MD

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
![npm](https://img.shields.io/npm/v/replace-jquery.svg?color=red)
2-
![license](https://badgen.net/github/license/sachinchoolur/replace-jquery)
1+
![npm](https://img.shields.io/npm/v/jquery-to-js.svg?color=red)
2+
![license](https://badgen.net/github/license/sachinchoolur/jquery-to-js)
33

44
#### Test coverage
55

@@ -20,37 +20,37 @@ And in most of the cases, I didn't want to support all the edge cases or legacy
2020

2121
## Installation and Usage
2222

23-
You can install replace-jquery using npm:
23+
You can install jquery-to-js using npm:
2424

2525
```sh
26-
npm install -g replace-jquery
26+
npm install -g jquery-to-js
2727
```
2828

2929
- Find all jQuery methods from `sample.js` and write vanillaJs alternatives in out.js
3030

3131
```sh
32-
replace-jquery src/sample.js out.js
32+
jquery-to-js src/sample.js out.js
3333
```
3434

3535
- Find all jQuery methods from all matching files and write vanillaJs alternatives in out.js
3636

3737
```sh
38-
replace-jquery "src/*.js" out.js
38+
jquery-to-js "src/*.js" out.js
3939
```
4040

4141
- Build vanillaJs alternatives for the all available jQuery methods
4242

4343
```sh
44-
replace-jquery --build-all out.js
44+
jquery-to-js --build-all out.js
4545
```
4646

4747
- Build vanillaJs alternatives for the specified jQuery methods
4848

4949
```sh
50-
replace-jquery --methods "addClass, removeClass, attr" -o utils.js
50+
jquery-to-js --methods "addClass, removeClass, attr" -o utils.js
5151
```
5252

53-
Please note that, the utility functions generated by `replace-jquery` are not completely equivalent to jQuery methods in all scenarios. Please consider this as a starting point and validate before you adopt it.
53+
Please note that, the utility functions generated by `jquery-to-js` are not completely equivalent to jQuery methods in all scenarios. Please consider this as a starting point and validate before you adopt it.
5454

5555
## Basic Concepts
5656

@@ -147,9 +147,9 @@ $utils(".vue").siblings().addClass("highlight");
147147

148148
Demo - <https://codepen.io/sachinchoolur/pen/oNWNdxE>
149149

150-
You can see that the `addClass` method is depended on the `each` method, so if you generate addClass method using `replace-jquery --methods "addClass" -o utils.js` the output file will contain `addClass` and `each` methods.
150+
You can see that the `addClass` method is depended on the `each` method, so if you generate addClass method using `jquery-to-js --methods "addClass" -o utils.js` the output file will contain `addClass` and `each` methods.
151151

152-
Similarly, all the examples you see below, will add it's dependencies when you generate it using `replace-jquery`
152+
Similarly, all the examples you see below, will add it's dependencies when you generate it using `jquery-to-js`
153153

154154
## List of jQuery alternative methods in alphabetical order
155155

cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const { program } = require('commander');
33
const packageDetails = require('./package.json');
44

5-
const replaceJQuery = require('./src/replace-jquery');
5+
const replaceJQuery = require('./src/jquery-to-js');
66
const buildFromOptions = require('./src/build-methods');
77
const buildSpecificMethods = require('./src/build-specific-methods');
88

demo/browser-test.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434

3535
<!-- <script src="espree.browser.js"></script>
3636
<script src="estraverse.browser.js"></script>
37-
<script src="replace-jquery-browser.js"></script> -->
37+
<script src="jquery-to-js-browser.js"></script> -->
3838
<script src="https://unpkg.com/prettier@3.2.5/standalone.js"></script>
3939
<script src="https://unpkg.com/prettier@3.2.5/plugins/babel.js"></script>
4040
<script src="https://unpkg.com/prettier@3.2.5/plugins/estree.js"></script>
4141

42-
<script src="../dist/replace-jquery-browser.js"></script>
42+
<script src="../dist/jquery-to-js-browser.js"></script>
4343
<script>
4444
var source = `
4545
$('#highlight').on('click', () => {
File renamed without changes.

dist/replace-jquery-browser.js renamed to dist/jquery-to-js-browser.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery-to-js-browser.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/replace-jquery-browser.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)