Skip to content

Commit 16a1c58

Browse files
Harrison IfeanyichukwuHarrison Ifeanyichukwu
authored andcommitted
fix: moved to teclone namespace, fixed readme, generated esm build
1 parent 7df9a3d commit 16a1c58

File tree

8 files changed

+12146
-13314
lines changed

8 files changed

+12146
-13314
lines changed

.buildrc.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
2+
/build
33
.nyc_output

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ cache:
55
notifications:
66
email: false
77
node_js:
8-
- "9"
9-
- "8"
8+
- '10'
9+
- '12'
1010
script:
1111
- npm run test
1212
jobs:
1313
include:
1414
- stage: release
15-
node_js: "10"
15+
node_js: '12'
1616
script:
1717
- npm run test
1818
- npm run build

README.md

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# XML-Serializer
22

3-
[![Build Status](https://travis-ci.org/harrison-ifeanyichukwu/xml-serializer.svg?branch=master)](https://travis-ci.org/harrison-ifeanyichukwu/xml-serializer)
4-
[![Coverage Status](https://coveralls.io/repos/github/harrison-ifeanyichukwu/xml-serializer/badge.svg?branch=master)](https://coveralls.io/github/harrison-ifeanyichukwu/xml-serializer?branch=master)
3+
[![Build Status](https://travis-ci.org/teclone/xml-serializer.svg?branch=master)](https://travis-ci.org/teclone/xml-serializer)
4+
[![Coverage Status](https://coveralls.io/repos/github/teclone/xml-serializer/badge.svg?branch=master)](https://coveralls.io/github/teclone/xml-serializer?branch=master)
55
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6-
[![npm version](https://badge.fury.io/js/%40harrison-ifeanyichukwu%2Fxml-serializer.svg)](https://badge.fury.io/js/%40harrison-ifeanyichukwu%2Fxml-serializer)
7-
![npm](https://img.shields.io/npm/dt/%40harrison-ifeanyichukwu%2Fxml-serializer.svg)
6+
[![npm version](https://badge.fury.io/js/%40teclone%2Fxml-serializer.svg)](https://badge.fury.io/js/%40teclone%2Fxml-serializer)
7+
![npm](https://img.shields.io/npm/dt/%40teclone%2Fxml-serializer.svg)
88

99
XML-Serializer is a complete JavaScript implementation of the W3C [xml serialization](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml) specifications. All specifications have been implemented and includes the following [specs](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-xml-serialization-algorithm):
1010

@@ -24,7 +24,7 @@ XML-Serializer is a complete JavaScript implementation of the W3C [xml serializa
2424

2525
## Module Availability
2626

27-
This module is available as an [npm](https://www.npmjs.com/package/@harrison-ifeanyichukwu/xml-serializer) scoped package and also has a browser build that is located inside the `dist` folder. It can easily be integrated with [JSDOM](https://github.com/jsdom/jsdom) for mockup testing.
27+
This module is available as an [npm](https://www.npmjs.com/package/@teclone/xml-serializer) scoped package and also has a browser build that is located inside the `dist` folder. It can easily be integrated with [JSDOM](https://github.com/jsdom/jsdom) for mockup testing.
2828

2929
## Getting Started
3030

@@ -33,15 +33,15 @@ The below command will install `xml-serializer` from npm into your project assum
3333
**Install as a development dependency**:
3434

3535
```bash
36-
npm install --save-dev @harrison-ifeanyichukwu/xml-serializer
36+
npm install --save-dev @teclone/xml-serializer
3737
```
3838

3939
## Usage Guide
4040

4141
Following the specification, the `XMLSerializer` interface is a constructor and has a `serializeToString(root)` method exposed on the instance. To serialize any xml node, call the `serializeToString(root)` method on a constructed instance, passing in the xml node as like shown below:
4242

4343
```javascript
44-
import XMLSerializer from '@harrison-ifeanyichukwu/xml-serializer';
44+
import XMLSerializer from '@teclone/xml-serializer';
4545

4646
let instance = new XMLSerializer();
4747
console.log(instance.serializeToString(someXmlNode));
@@ -61,8 +61,8 @@ Currently, JSDOM has not implemented the `XMLSerializer` interface. This can be
6161

6262
```javascript
6363
//assumes jsdom has been installed.
64-
import XMLSerializer from '@harrison-ifeanyichukwu/xml-serializer';
65-
import {JSDOM} from 'jsdom';
64+
import XMLSerializer from '@teclone/xml-serializer';
65+
import { JSDOM } from 'jsdom';
6666

6767
let dom = new JSDOM();
6868
dom.window.XMLSerializer = XMLSerializer;
@@ -76,10 +76,14 @@ global.window = dom.window;
7676
The browser build is available inside the `dist` folder when you npm install the package. You can also this repo and run the build command locally. It exposes an `XMLSerializer` construct on the `window` object.
7777

7878
```html
79-
<script type="text/javascript" src="node_modules/@harrison-ifeanyichukwu/xml-serializer/dist/main.min.js"><script>
80-
<script type="text/javascript">
81-
let serializer = new XMLSerializer();
82-
// do some serialization stuffs
79+
<script
80+
type="text/javascript"
81+
src="node_modules/@teclone/xml-serializer/dist/main.min.js"
82+
>
83+
<script>
84+
<script type="text/javascript">
85+
let serializer = new XMLSerializer();
86+
// do some serialization stuffs
8387
</script>
8488
```
8589

@@ -149,7 +153,7 @@ this:
149153

150154
**Chrome inbuilt XMLSerializer Output:**
151155

152-
Notice that all of the duplicated namespaces are removed.
156+
Notice that none of the duplicated namespaces is removed.
153157

154158
```xml
155159
<?xml version="1.0" encoding="utf-8" ?><!DOCTYPE root PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -158,10 +162,9 @@ Notice that all of the duplicated namespaces are removed.
158162
<?xml-stylesheet href="classic.css" alternate="yes" title="Classic"
159163
media="screen, print" type="text/css"?>
160164

161-
<!--notice that two namespaces have been defined on the root element-->
162165
<root xmlns:h="http://www.w3.org/TR/html4/" xmlns:f="https://www.w3schools.com/furniture">
163166

164-
<!--notice that it is declared again here. this is a duplicate-->
167+
<!-- duplicates still remains -->
165168
<h:table xmlns:h="http://www.w3.org/TR/html4/" xmlns:f="https://www.w3schools.com/furniture">
166169
<h:tr>
167170
<h:td>
@@ -170,7 +173,7 @@ Notice that all of the duplicated namespaces are removed.
170173
</h:tr>
171174
</h:table>
172175

173-
<!--one is duplicated here-->
176+
<!--still remains-->
174177
<f:table xmlns:f="https://www.w3schools.com/furniture">
175178
<f:name>African Coffee Table</f:name>
176179
<f:width>80</f:width>
@@ -214,7 +217,7 @@ Notice that all of the duplicated namespaces are removed.
214217
<!--notice that two namespaces have been defined on the root element-->
215218
<root xmlns:h="http://www.w3.org/TR/html4/" xmlns:f="https://www.w3schools.com/furniture">
216219

217-
<!--notice that it is declared again here. this is a duplicate-->
220+
<!--duplicates removed-->
218221
<h:table>
219222
<h:tr>
220223
<h:td>
@@ -223,7 +226,7 @@ Notice that all of the duplicated namespaces are removed.
223226
</h:tr>
224227
</h:table>
225228

226-
<!--one is duplicated here-->
229+
<!--duplicate removed-->
227230
<f:table>
228231
<f:name>African Coffee Table</f:name>
229232
<f:width>80</f:width>
@@ -264,17 +267,3 @@ We welcome your own contributions, ranging from code refactoring, documentation
264267
3. Implement your ideas, and once stable,
265268

266269
4. Create a pull request, explaining your improvements/features
267-
268-
All future contributors will be included below and immensely appreciated. We look forward to your contributions.
269-
270-
## About Project Maintainers
271-
272-
This project is maintained by [harrison ifeanyichukwu](mailto:[email protected]), a young, passionate full stack web developer, an [MDN](https://developer.mozilla.org/en-US/profiles/harrison-feanyichukwu) documentator, maintainer of node.js [rollup-all](https://www.npmjs.com/package/rollup-all) project, [R-Server](https://github.com/harrison-ifeanyichukwu/r-server) (a web server project), and other amazing projects.
273-
274-
He is available for hire, ready to work on `PHP` projects, `Node.js` projects, `React` and `Angular` projects and stuffs like that. Looks forward to hearing from you soon!!!
275-
276-
## Acknowledgments
277-
278-
In addition to the spec, the following sections as well as outside resources were consulted and proved very useful:
279-
280-
[serialize-doc-type](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-doctype), [serialize-xml-attribute](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml-attributes), [serialize-attr-value](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-attr-value), [record-element-namespace-info](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-record-namespace-info), [generate-prefix](https://www.w3.org/TR/DOM-Parsing/#dfn-concept-generate-prefix), [xml-character-sets](https://www.w3.org/TR/xml/), [detect-non-valid-xml-characters](https://stackoverflow.com/questions/29031792/detect-non-valid-xml-characters-javascript)

0 commit comments

Comments
 (0)