Skip to content

Commit

Permalink
Add debugging (#68)
Browse files Browse the repository at this point in the history
* Updating dependencies and adding debug

* Minifying code

* Updating example

* Cleaning up spelling

* Minfying and adding documentation

* fixing export.default bug

Co-authored-by: Sean Thomas Burke <[email protected]>
  • Loading branch information
seantomburke and seantomburke authored Nov 25, 2020
1 parent 3b3d480 commit 33ba57d
Show file tree
Hide file tree
Showing 16 changed files with 3,235 additions and 1,707 deletions.
20 changes: 18 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
module.exports = (api) => {
api.cache(true);

const presets = ['@babel/preset-env'];
const plugins = [[ 'add-module-exports', { 'addDefaultProperty': true }]];
const presets = [
[
'@babel/preset-env',
{
"targets": {
"esmodules": true
}
}
],
'minify', // minify the Babel code
];
const plugins = [
[
'add-module-exports',
{ 'addDefaultProperty': true },
]
];

return {
presets,
plugins,
comments: false, // Remove comments during minification
};
};
25 changes: 25 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": "0.1",
"language": "en",
"dictionaries": [
"bash",
"entities",
"filetypes",
"fullstack",
"html",
"html-symbol-entities",
"misc",
"node",
"softwareTerms"
],
"words": [
"sitemapper",
"esmodules"
],
"allowCompoundWords": true,
"flagWords": [],
"ignoreWords": [],
"ignorePaths": [
"node_modules/"
]
}
14 changes: 7 additions & 7 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Type: [Array][29]&lt;[String][30]>
```javascript
[
'www.google.com',
'www.linkedin.com'
'https://www.linkedin.com'
]
```

Expand All @@ -72,10 +72,10 @@ Type: [Object][31]

```javascript
{
url: 'linkedin.com/sitemap.xml',
url: 'https://linkedin.com/sitemap.xml',
sites: [
'linkedin.com/project1',
'linkedin.com/project2'
'https://linkedin.com/project1',
'https://linkedin.com/project2'
]
}
```
Expand All @@ -102,11 +102,11 @@ Type: [Object][31]
{
error: "There was an error!"
data: {
url: 'linkedin.com',
url: 'https://linkedin.com',
urlset: [{
url: 'www.linkedin.com/project1'
url: 'https://www.linkedin.com/project1'
},[{
url: 'www.linkedin.com/project2'
url: 'https://www.linkedin.com/project2'
}]
}
}
Expand Down
1 change: 1 addition & 0 deletions example.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const sitemapper = new Sitemapper();

const Google = new Sitemapper({
url: 'https://www.google.com/work/sitemap.xml',
debug: false,
timeout: 15000, // 15 seconds
});

Expand Down
1 change: 1 addition & 0 deletions example.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var Sitemapper = require('sitemapper');
// Instantiate an instance with options
var Google = new Sitemapper({
url: 'https://www.google.com/work/sitemap.xml',
debug: false,
timeout: 15000 //15 seconds
});

Expand Down
Loading

0 comments on commit 33ba57d

Please sign in to comment.