-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
OSOE-815: Using simpler NPM dependencies to test ConstantFromJsonAttribute
- Loading branch information
Showing
3 changed files
with
16 additions
and
26 deletions.
There are no files selected for viewing
15 changes: 10 additions & 5 deletions
15
Lombiq.HelpfulLibraries.Tests/Models/ConstantFromJsonSample.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
using Lombiq.HelpfulLibraries.Attributes; | ||
using Lombiq.HelpfulLibraries.Attributes; | ||
|
||
namespace Lombiq.HelpfulLibraries.Tests.Models; | ||
|
||
/// <summary> | ||
/// Shows how to use the <see cref="ConstantFromJsonAttribute" />. | ||
/// </summary> | ||
[ConstantFromJson(constantName: "GulpUglifyVersion", fileName: "package.json", propertyName: "gulp-uglify")] | ||
[ConstantFromJson(constantName: "GulpVersion", fileName: "package.json", propertyName: "gulp")] | ||
/// <remarks> | ||
/// <para> | ||
/// Using two really simple packages as a test. | ||
/// </para> | ||
/// </remarks> | ||
[ConstantFromJson(constantName: "IsEvenVersion", fileName: "package.json", propertyName: "is-even")] | ||
[ConstantFromJson(constantName: "IsOddVersion", fileName: "package.json", propertyName: "is-odd")] | ||
public partial class ConstantFromJsonSample | ||
{ | ||
public string ReturnVersions() | ||
{ | ||
var stringBuilder = new System.Text.StringBuilder(); | ||
stringBuilder.AppendLine($"Gulp version: {GulpVersion}"); | ||
stringBuilder.AppendLine($"Gulp-uglify version: {GulpUglifyVersion}"); | ||
stringBuilder.AppendLine($"is-even version: {IsEvenVersion}"); | ||
stringBuilder.AppendLine($"is-odd version: {IsOddVersion}"); | ||
return stringBuilder.ToString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,8 @@ | ||
{ | ||
"private": true, | ||
"devDependencies": { | ||
"fs": "0.0.2", | ||
"glob": "5.0.15", | ||
"path-posix": "1.0.0", | ||
"merge-stream": "1.0.0", | ||
"gulp-if": "2.0.0", | ||
"gulp": "3.9.0", | ||
"gulp-newer": "0.5.1", | ||
"gulp-plumber": "1.0.1", | ||
"gulp-sourcemaps": "1.6.0", | ||
"gulp-less": "3.0.3", | ||
"gulp-autoprefixer": "2.2.0", | ||
"gulp-minify-css": "1.2.1", | ||
"gulp-typescript": "2.9.2", | ||
"gulp-uglify": "1.4.1", | ||
"gulp-rename": "1.2.2", | ||
"gulp-concat": "2.6.0", | ||
"gulp-header": "1.7.1" | ||
"is-even": "1.0.0", | ||
"is-odd": "3.0.1" | ||
}, | ||
"dependencies": { } | ||
} |