Skip to content

Commit 0f970e2

Browse files
committed
Merge branch 'develop'
* develop: Update README new build/CI Added CI configuration files Added Cake build script & boostrappers Added MSBuild solution/project & ported to .NET Core Change website url, added nuget package info & appveyor yml
2 parents 7e6186e + 37dbc78 commit 0f970e2

18 files changed

Lines changed: 700 additions & 94 deletions

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
/bin
22
/src/LitJson/AssemblyInfo.cs
33
/website
4+
[Oo]bj/
5+
[Bb]in/
6+
.vscode/
7+
[Tt]ools/*
8+
![Tt]ools/packages.config
9+
[Aa]rtifacts/
10+
.[Dd]otnet/

.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: csharp
2+
os:
3+
- osx
4+
- linux
5+
6+
# Ubuntu 14.04
7+
sudo: required
8+
dist: trusty
9+
10+
# OS X 10.12
11+
osx_image: xcode9.2
12+
13+
mono:
14+
- 4.4.2
15+
16+
dotnet: 2.1.3
17+
18+
before_install:
19+
- git fetch --unshallow # Travis always does a shallow clone, but GitVersion needs the full history including branches and tags
20+
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
21+
- git fetch origin
22+
23+
script:
24+
- ./build.sh --target=Test

LitJSON.sln

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26124.0
5+
MinimumVisualStudioVersion = 15.0.26124.0
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LitJSON", "src\LitJson\LitJSON.csproj", "{CFBC33D5-BB2D-4F22-B157-0862C4A77039}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LitJSON.Tests", "test\LitJSON.Tests.csproj", "{E031C1B4-CD87-475E-9283-4571435C65DB}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Debug|x64 = Debug|x64
14+
Debug|x86 = Debug|x86
15+
Release|Any CPU = Release|Any CPU
16+
Release|x64 = Release|x64
17+
Release|x86 = Release|x86
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
23+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Debug|x64.ActiveCfg = Debug|x64
26+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Debug|x64.Build.0 = Debug|x64
27+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Debug|x86.ActiveCfg = Debug|x86
28+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Debug|x86.Build.0 = Debug|x86
29+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Release|x64.ActiveCfg = Release|x64
32+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Release|x64.Build.0 = Release|x64
33+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Release|x86.ActiveCfg = Release|x86
34+
{CFBC33D5-BB2D-4F22-B157-0862C4A77039}.Release|x86.Build.0 = Release|x86
35+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Debug|x64.ActiveCfg = Debug|x64
38+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Debug|x64.Build.0 = Debug|x64
39+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Debug|x86.ActiveCfg = Debug|x86
40+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Debug|x86.Build.0 = Debug|x86
41+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Release|Any CPU.Build.0 = Release|Any CPU
43+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Release|x64.ActiveCfg = Release|x64
44+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Release|x64.Build.0 = Release|x64
45+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Release|x86.ActiveCfg = Release|x86
46+
{E031C1B4-CD87-475E-9283-4571435C65DB}.Release|x86.Build.0 = Release|x86
47+
EndGlobalSection
48+
EndGlobal

README.md

Lines changed: 76 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,112 @@
11
LitJSON
22
=======
33

4+
[![NuGet](https://img.shields.io/nuget/v/LitJson.svg)](https://www.nuget.org/packages/LitJson) [![MyGet](https://img.shields.io/myget/litjson/vpre/LitJson.svg?label=myget)](https://www.myget.org/gallery/litjson)
5+
46
A *.Net* library to handle conversions from and to JSON (JavaScript Object
57
Notation) strings.
68

7-
[Project website][litjson].
9+
> _It's quick and lean, without external dependencies.
10+
> Just a few classes so easily embeddable in your own code or a very small assembly to ship with your code.
11+
> The code is highly portable, which in general makes it easy to adapt for new platforms._
812
913

10-
## Compiling
14+
## Continuous integration
15+
16+
| Build server | Platform | Build status |
17+
|-----------------------------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
18+
| AppVeyor | Windows | [![AppVeyor branch](https://img.shields.io/appveyor/ci/litjson/litjson/develop.svg)](https://ci.appveyor.com/project/litjson/litjson/branch/develop) |
19+
| Travis | Linux / OS X | [![Travis build status](https://travis-ci.org/LitJSON/litjson.svg?branch=develop)](https://travis-ci.org/LitJSON/litjson) |
1120

12-
See the files under the `build` directory.
1321

14-
### Using GNU Make
22+
## Compiling
1523

16-
Change directory to `build/make/` and run `make` from it. This tries to use
17-
the `gmcs` compiler by default. Feel free to open the `Makefile` and tweak
18-
it according to your needs.
24+
Code can be compiled using .NET CLI or by launching the bootstrappers in the root of the repository.
1925

20-
### Using other tools
26+
#### Windows
2127

22-
Currently, LitJSON doesn't have any other auxiliary files for compiling this
23-
library with other tools.
28+
```powershell
29+
./build.ps1
30+
```
2431

25-
If you want to contribute your own solutions to compile it with tools like
26-
*NAnt* or *MSBuild*, that would be most appreciated. Please create those
27-
auxiliary files under the path `build/some-tool`. Thanks.
32+
#### Linux / OS X
2833

29-
## Tests
34+
```console
35+
./build.sh
36+
```
37+
38+
#### Prerequisites
39+
40+
The bootstrappers will (locally in repo)
41+
42+
* Fetch and install .NET Core CLI / SDK version needed to compile LitJSON.
43+
* Fetch and install Cake runner
44+
* Execute build script with supplied target (`--target=[Target]`) or by default
45+
1. Clean previous artifacts
46+
1. Restore build dependencies from NuGet
47+
1. Build
48+
1. Run unit tests
49+
1. Create NuGet package
50+
51+
#### Testing
3052

3153
This library comes with a set of unit tests using the [NUnit][nunit]
3254
framework.
3355

34-
If you have [pkg-config][pkg-config] in your system, and the *Mono* suite
35-
provides the `mono-nunit.pc` file, you can try running these tests by running
36-
`make test` from the `build/make` directory.
56+
## Using LitJSON from an application
3757

38-
You can specify which `pkg-config` is invoked by passing a `PKG_CONFIG`
39-
variable to `make test`. This is useful when you have mutiple conflicting
40-
`pkg-config`s on your system and need to select the correct one (i.e. to
41-
avoid conflicts with Homebrew on Mac OSX).
58+
#### Package manager
4259

43-
Example of running the tests on Mac OSX:
60+
```PowerShell
61+
Install-Package LitJson -Version 0.10.0
62+
```
4463

45-
```bash
46-
# In litjson/ directory
47-
$ cd build/make
48-
$ make PKG_CONFIG=/Library/Frameworks/Mono.framework/Commands/pkg-config test
64+
#### .NET CLI
65+
66+
```PowerShell
67+
dotnet add package LitJson --version 0.10.0
4968
```
5069

51-
## Using LitJSON from an application
70+
#### Paket CLI
5271

53-
Reference the `LitJson.dll` file when compiling your code. For a link to
54-
download this file, see the *Download* section in the project's
55-
[website][litjson].
72+
```PowerShell
73+
paket add LitJson --version 0.10.0
74+
```
5675

5776
Alternatively, just copy the whole tree of files under `src/LitJSON` to your
5877
own project's source tree and integrate it with your development environment.
5978

79+
#### Requirements
80+
81+
LitJSON currently targets and supports
82+
* .NET Standard 2.0
83+
* .NET Standard 1.5
84+
* .NET Framework 4.5 and above
85+
* Mono 4.4.2 and above
86+
87+
But the code is very portable and can even be compiled under SQLCLR, which [WCOMAB/SqlServerSlackAPI](https://github.com/WCOMAB/SqlServerSlackAPI) is an example of.
88+
89+
#### Prereleases
90+
91+
Each merge to develop is published to our NuGet feed on [MyGet](mygetgallery).
92+
93+
## Contributing
94+
95+
So you’re thinking about contributing to LitJSON? Great! It’s **really** appreciated.
96+
97+
* Create an issue
98+
* Fork the repository.
99+
* Create a feature branch from `develop` to work in.
100+
* Make your feature addition or bug fix.
101+
* Don't forget the unit tests.
102+
* Send a pull request.
103+
60104
## License
61105

62106
[Unlicense][unlicense] (public domain).
63107

64-
65-
[litjson]: http://lbv.github.io/litjson/
108+
[mygetgallery]: [https://www.myget.org/gallery/litjson]
109+
[litjson]: [unlicense](http://unlicense.org/
66110
[nunit]: http://www.nunit.org/
67111
[pkg-config]: http://www.freedesktop.org/wiki/Software/pkg-config
68112
[unlicense]: http://unlicense.org/

appveyor.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Operating system (build VM template)
2+
os: Visual Studio 2017
3+
4+
# Build script
5+
build_script:
6+
- ps: .\build.ps1 --target="AppVeyor" --verbosity=Verbose
7+
8+
# Tests
9+
test: off

0 commit comments

Comments
 (0)