Skip to content

Commit e1e4a4a

Browse files
committed
Include documention
1 parent 50d528c commit e1e4a4a

File tree

13 files changed

+210
-9
lines changed

13 files changed

+210
-9
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 0.15.0
2+
3+
Released on Sunday, June 12 2021.
4+
5+
- Updated to use AngleSharp 0.15
6+
17
# 0.14.0
28

39
Released on Tuesday, March 31 2020.

build.cake

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ var frameworks = new Dictionary<String, String>
66
{ "net46", "net46" },
77
{ "net461", "net461" },
88
{ "net472", "net472" },
9-
{ "netstandard1.3", "netstandard1.3" },
109
{ "netstandard2.0", "netstandard2.0" },
1110
};
1211

docs/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AngleSharp.Js Documentation
2+
3+
We have more detailed information regarding the following subjects:
4+
5+
- [API Documentation](tutorials/01-API.md)

docs/general/01-Basics.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "Getting Started"
3+
section: "AngleSharp.Js"
4+
---
5+
# Getting Started
6+
7+
## Requirements
8+
9+
AngleSharp.Js comes currently in two flavors: on Windows for .NET 4.6 and in general targetting .NET Standard 2.0 platforms.
10+
11+
Most of the features of the library do not require .NET 4.6, which means you could create your own fork and modify it to work with previous versions of the .NET-Framework.
12+
13+
You need to have AngleSharp installed already. This could be done via NuGet:
14+
15+
```ps1
16+
Install-Package AngleSharp
17+
```
18+
19+
## Getting AngleSharp.Js over NuGet
20+
21+
The simplest way of integrating AngleSharp.Js to your project is by using NuGet. You can install AngleSharp.Js by opening the package manager console (PM) and typing in the following statement:
22+
23+
```ps1
24+
Install-Package AngleSharp.Js
25+
```
26+
27+
You can also use the graphical library package manager ("Manage NuGet Packages for Solution"). Searching for "AngleSharp.Js" in the official NuGet online feed will find this library.
28+
29+
## Setting up AngleSharp.Js
30+
31+
To use AngleSharp.Js you need to add it to your `Configuration` coming from AngleSharp itself.
32+
33+
If you just want a configuration *that works* you should use the following code:
34+
35+
```cs
36+
var config = Configuration.Default
37+
.WithJs(); // from AngleSharp.Js
38+
```
39+
40+
This will register a scripting engine for JS files. The JS parsing options and more could be set with parameters of the `WithJs` method.
41+
42+
You can also use this part with a console for logging. The call for this is `WithConsoleLogger`, e.g.,
43+
44+
```cs
45+
var config = Configuration.Default
46+
.WithJs()
47+
.WithConsoleLogger(ctx => new MyConsoleLogger(ctx));
48+
```
49+
50+
in the previous example `MyConsoleLogger` refers to a class implementing the `IConsoleLogger` interface. Examples of classes implementing this interface are available in our [samples repository](https://github.com/AngleSharp/AngleSharp.Samples).

docs/tutorials/01-API.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: "API Documentation"
3+
section: "AngleSharp.Js"
4+
---
5+
# API Documentation
6+
7+
(tbd)

docs/tutorials/02-Examples.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "Examples"
3+
section: "AngleSharp.Js"
4+
---
5+
# Example Code
6+
7+
This is a (growing) list of examples for every-day usage of AngleSharp.Wasm.
8+
9+
## Some Example
10+
11+
(tbd)

docs/tutorials/03-Questions.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "Questions"
3+
section: "AngleSharp.Js"
4+
---
5+
# Frequently Asked Questions
6+
7+
## What to ask?
8+
9+
(tbd)
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "AngleSharp.Js",
3+
"author": "Florian Rappl",
4+
"branch": "devel",
5+
"repositoryUrl": "https://github.com/AngleSharp/AngleSharp.Js",
6+
"rootDir": "../../",
7+
"outputDir": "./dist",
8+
"sitemap": {
9+
"general": {
10+
"sections": [
11+
{
12+
"generator": "markdown",
13+
"segment": "core",
14+
"dir": "general"
15+
}
16+
]
17+
},
18+
"docs": {
19+
"sections": [
20+
{
21+
"generator": "markdown",
22+
"segment": "core",
23+
"dir": "tutorials"
24+
}
25+
]
26+
}
27+
}
28+
}

src/AngleSharp.Js.Docs/package.json

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"name": "@anglesharp/js",
3+
"version": "0.16.0",
4+
"preview": true,
5+
"description": "The doclet for the AngleSharp.Js documentation.",
6+
"keywords": [
7+
"pilet"
8+
],
9+
"dependencies": {},
10+
"devDependencies": {
11+
"@anglesharp/website": "1.0.0",
12+
"@types/react": "^17.0.5",
13+
"@types/react-dom": "^17.0.5",
14+
"@types/react-router": "latest",
15+
"@types/react-router-dom": "^5.1.7",
16+
"@types/node": "^15.3.0",
17+
"typescript": "^4.2.4",
18+
"@dbeining/react-atom": "4.1.19",
19+
"@libre/atom": "1.3.3",
20+
"history": "4.10.1",
21+
"react": "17.0.2",
22+
"react-dom": "17.0.2",
23+
"react-router": "5.2.0",
24+
"react-router-dom": "5.2.0",
25+
"tslib": "2.2.0",
26+
"path-to-regexp": "1.8.0",
27+
"piral-cli": "^0.13.3-pre.2480",
28+
"piral-cli-parcel": "^0.13.3-pre.2480"
29+
},
30+
"peerDependencies": {
31+
"@dbeining/react-atom": "*",
32+
"@libre/atom": "*",
33+
"history": "*",
34+
"react": "*",
35+
"react-dom": "*",
36+
"react-router": "*",
37+
"react-router-dom": "*",
38+
"tslib": "*",
39+
"path-to-regexp": "*",
40+
"@anglesharp/website": "*"
41+
},
42+
"scripts": {
43+
"start": "pilet debug",
44+
"build": "pilet build",
45+
"upgrade": "pilet upgrade"
46+
},
47+
"main": "dist/index.js",
48+
"files": [
49+
"dist"
50+
],
51+
"piral": {
52+
"comment": "Keep this section to use the Piral CLI.",
53+
"name": "@anglesharp/website"
54+
},
55+
"peerModules": [
56+
"piral-docs-tools/components"
57+
]
58+
}

src/AngleSharp.Js.Docs/src/index.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { PiletApi } from 'piral-docs-tools';
2+
3+
const createDoclet = require('piral-docs-tools/doclet');
4+
5+
export function setup(api: PiletApi) {
6+
createDoclet(api);
7+
}

src/AngleSharp.Js.Docs/tsconfig.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"compilerOptions": {
3+
"declaration": true,
4+
"noImplicitAny": false,
5+
"removeComments": false,
6+
"noLib": false,
7+
"emitDecoratorMetadata": true,
8+
"experimentalDecorators": true,
9+
"target": "es6",
10+
"sourceMap": true,
11+
"outDir": "./dist",
12+
"skipLibCheck": true,
13+
"lib": ["dom", "es2018"],
14+
"moduleResolution": "node",
15+
"module": "esnext",
16+
"jsx": "react",
17+
"importHelpers": true
18+
},
19+
"include": [
20+
"./src"
21+
],
22+
"exclude": [
23+
"node_modules"
24+
]
25+
}

src/AngleSharp.Js/AngleSharp.Js.csproj

+3-7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<PropertyGroup>
33
<AssemblyName>AngleSharp.Js</AssemblyName>
44
<RootNamespace>AngleSharp.Js</RootNamespace>
5-
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.3;netstandard2.0</TargetFrameworks>
6-
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard1.3;netstandard2.0;net46;net461;net472</TargetFrameworks>
5+
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
6+
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;net46;net461;net472</TargetFrameworks>
77
<SignAssembly>true</SignAssembly>
88
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -21,14 +21,10 @@
2121
</ItemGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="AngleSharp" Version="0.14.0" />
24+
<PackageReference Include="AngleSharp" Version="0.15.0" />
2525
<PackageReference Include="Jint" Version="2.10.4" />
2626
</ItemGroup>
2727

28-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
29-
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
30-
</ItemGroup>
31-
3228
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
3329
<DelaySign>false</DelaySign>
3430
</PropertyGroup>

src/Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<PropertyGroup>
33
<Description>Integrates a JavaScript engine to AngleSharp.</Description>
44
<Product>AngleSharp.Js</Product>
5-
<Version>0.14.0</Version>
5+
<Version>0.15.0</Version>
66
</PropertyGroup>
77
</Project>

0 commit comments

Comments
 (0)