Skip to content

Commit ed85c30

Browse files
committed
👾 Number 5 is alive!
0 parents  commit ed85c30

30 files changed

+8715
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* -text

.gitignore

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
*.obj
2+
*.pdb
3+
*.user
4+
*.aps
5+
*.pch
6+
*.vspscc
7+
*.vssscc
8+
*_i.c
9+
*_p.c
10+
*.ncb
11+
*.suo
12+
*.tlb
13+
*.tlh
14+
*.bak
15+
*.cache
16+
*.ilk
17+
*.log
18+
*.lib
19+
*.sbr
20+
*.scc
21+
*.tmp
22+
[Bb]in/
23+
[Dd]ebug/
24+
obj/
25+
[Rr]elease/
26+
[Tt]humbs.db
27+
[Tt]est[Rr]esult*
28+
[Bb]uild[Ll]og.*
29+
*.[Pp]ublish.xml
30+
*.log.*
31+
[Ll]ogs/
32+
[Dd]ata/
33+
[Pp]ackages/
34+
*nlog*.csv
35+
nlog-404s.csv
36+
imagecache/
37+
[Aa]ssemblies/
38+
[Rr]aven/
39+
.vs/
40+
41+
# Windows Azure
42+
csx/
43+
rcf/
44+
45+
# Windows Azure Publish Settings contain security keys for accessing your Windows Azure account
46+
.publishsettings
47+
48+
# Resharper Ignores
49+
_ReSharper.*/
50+
*.resharper.user
51+
52+
.sass-cache/
53+
54+
# Ignore build stuff
55+
[Bb]uild/Artifacts/
56+
[Ss]cripts-[Bb]uild/

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# How to contribute
2+
3+
One of the easiest ways to contribute is to participate in discussions and discuss issues. You can also contribute by submitting pull requests with code changes.
4+
5+
## Filing issues
6+
- Don't be afraid to ask any question about the project, including suggestions to change how things currently are.
7+
- Keep the conversation polite and respectful. This way, all parties will take an interest in your question and will be more proactive into helping.
8+
- For bugs, the best way to get your bug fixed is to be as detailed as you can be about the problem. Providing a minimal project with steps to reproduce the problem is ideal. Even though this might be painful, it will speed up the resolution to the problem.
9+
10+
GitHub supports [markdown](https://help.github.com/articles/github-flavored-markdown/), so when filing bugs make sure you check the formatting before clicking submit.
11+
12+
## Contributing code and content
13+
14+
**Identifying the scale**
15+
16+
If you would like to contribute to one of our repositories, first identify the scale of what you would like to contribute. If it is small (grammar/spelling or a bug fix) feel free to start working on a fix. If you are submitting a feature or substantial code contribution, please discuss it with the team.
17+
18+
You can also read these two blogs posts on contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. Note that all code submissions will be reviewed and tested by team members. Of course (where appropriate), tests will be required.
19+
20+
**Obtaining the source code**
21+
22+
If you are an outside contributer, please fork the appropriate repository you would like to contribute to. See the GitHub documentation on [forking a repo](https://help.github.com/articles/fork-a-repo/) if you have any questions about this.
23+
24+
**Building our Repositories**
25+
26+
All repositories are designed to be simple to get started. Once you have pulled down your own fork, just open up the solution file (`<something>.sln` for .NET) and then compile the solution.
27+
28+
**Submitting a Pull Request**
29+
30+
If you don't know what a pull request is read this article: https://help.github.com/articles/using-pull-requests. Make sure the repository can build and all tests pass. Familiarize yourself with the project workflow and our coding conventions.
31+
32+
Pull requests should all be done to the `master` branch.
33+
34+
When a pull request is accepted, squashed and merged (by the repo Administrators), we then manually create a Git tag, which will then be the trigger point to creating a new NuGet package. As such, we don't always create new NuGet packages on every Pull Request ... which is why this is a manual step.
35+
36+
**Commit/Pull Request Format**
37+
38+
```
39+
Summary of the changes (Less than 80 chars)
40+
- Detail 1
41+
- Detail 2
42+
43+
Addresses #bugnumber (in this specific format)
44+
```
45+
46+
**Tests**
47+
48+
- Tests need to be provided for every bug/feature that is completed.
49+
- Tests only need to be present for issues that need to be verified by QA (e.g. not tasks)
50+
- If there is a scenario that is far too hard to test there does not need to be a test for it.
51+
- "Too hard" is determined by the team as a whole.
52+
53+
---

LICENSE.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright (c) 2008 - 2012, Pure Krome
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5+
6+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7+
8+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9+
10+
* Neither the name of World Domination Technologies nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Project Description
2+
This is an MSBuild Task for helping minify and/or combine JS and CSS using the YUICompressor.NET library.
3+
4+
![CI Status via AppVeyor](https://ci.appveyor.com/api/projects/status/na9m20sc8dr8qg2r) ![NuGet](https://img.shields.io/nuget/dt/yuicompressor.net.msbuild.svg?syle=flat-square)
5+
6+
## Available via NuGet
7+
8+
[![NuGet Command with MSBuild Task](https://i.imgur.com/aqKIj.png)](https://nuget.org/packages/YUICompressor.NET.MSBuild)
9+
10+
Package Name: `YUICompressor.NET.MSBuild`
11+
CLI: `install-package YUICompressor.NET.MSBuild`
12+
13+
---

YUICompressor.NET.MSBuild.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27703.2042
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yahoo.Yui.Compressor.MsBuild", "src\Yahoo.Yui.Compressor.MsBuild\Yahoo.Yui.Compressor.MsBuild.csproj", "{FC51E4A2-EB87-462D-8945-92DD5A4F4624}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yahoo.Yui.Compressor.MsBuild.Tests", "tests\Yahoo.Yui.Compressor.MsBuild.Tests\Yahoo.Yui.Compressor.MsBuild.Tests.csproj", "{CEBF623F-AA1D-4694-988C-B9DDEC91F0A9}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{FC51E4A2-EB87-462D-8945-92DD5A4F4624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{FC51E4A2-EB87-462D-8945-92DD5A4F4624}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{FC51E4A2-EB87-462D-8945-92DD5A4F4624}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{FC51E4A2-EB87-462D-8945-92DD5A4F4624}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{CEBF623F-AA1D-4694-988C-B9DDEC91F0A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{CEBF623F-AA1D-4694-988C-B9DDEC91F0A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{CEBF623F-AA1D-4694-988C-B9DDEC91F0A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{CEBF623F-AA1D-4694-988C-B9DDEC91F0A9}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {244388D8-E74A-46E6-B529-C91A484327EE}
30+
EndGlobalSection
31+
EndGlobal

appveyor.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
version: '{build}.0.0-dev'
3+
configuration: Release
4+
os: Visual Studio 2017
5+
pull_requests:
6+
do_not_increment_build_number: true
7+
8+
environment:
9+
nuget_apiKey:
10+
secure: jfcUvHZhgnUboplqTBDWr8mG5PIlrgBv5TA2fhhop4ZSiDxskyy+RtYyeHoduJFR
11+
myget_apiKey:
12+
secure: AguzfXNvHBkkDebTyWHK7o9OC5YL3eszT6u7PnzGq2G7ozdUypDlGGpcFsTRYHEc
13+
14+
# Override the 'version' if this is a GH-tag-commit -or- this is a custom branch (i.e not 'master').
15+
init:
16+
- ps: |
17+
if ($env:APPVEYOR_REPO_TAG -eq $TRUE -and $env:APPVEYOR_REPO_BRANCH -eq 'master')
18+
{
19+
Write-Host " !! Commit is Tagged and branch is 'master' - forcing build version to tag-value." -ForegroundColor Red;
20+
Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME"
21+
}
22+
iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/PureKrome/0f79e25693d574807939/raw/f5b40256fc2ca77d49f1c7773d28406152544c1e/appveyor-build-info.ps'))
23+
24+
25+
before_build:
26+
# Display .NET Core version
27+
- cmd: dotnet --info
28+
# Display minimal restore text
29+
- cmd: dotnet restore --verbosity quiet
30+
31+
build_script:
32+
- dotnet build -c %CONFIGURATION% -v minimal /p:Version=%APPVEYOR_BUILD_VERSION% --no-restore
33+
34+
test_script:
35+
- dotnet test tests\Yahoo.Yui.Compressor.MsBuild.Tests -c %CONFIGURATION% -v minimal --no-restore --no-build
36+
- dotnet pack -c %CONFIGURATION% /p:Version=%APPVEYOR_BUILD_VERSION% --no-restore --no-build
37+
38+
artifacts:
39+
- path: '**\*.nupkg'
40+
name: packaged-nugets
41+
type: NuGetPackage
42+
43+
deploy:
44+
- provider: NuGet
45+
server: https://www.myget.org/F/pk-development/api/v2/package
46+
api_key:
47+
secure: AguzfXNvHBkkDebTyWHK7o9OC5YL3eszT6u7PnzGq2G7ozdUypDlGGpcFsTRYHEc
48+
skip_symbols: true
49+
artifact: packaged-nugets
50+
on:
51+
appveyor_repo_tag: false
52+
- provider: NuGet
53+
api_key:
54+
secure: jfcUvHZhgnUboplqTBDWr8mG5PIlrgBv5TA2fhhop4ZSiDxskyy+RtYyeHoduJFR
55+
skip_symbols: true
56+
artifact: packaged-nugets
57+
on:
58+
branch: master
59+
appveyor_repo_tag: true
60+
61+
cache:
62+
- packages -> **\packages.config
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Yahoo.Yui.Compressor.MsBuild
2+
{
3+
public enum ActionType
4+
{
5+
Unknown,
6+
Css,
7+
JavaScript
8+
}
9+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
using Microsoft.Build.Framework;
2+
using Microsoft.Build.Utilities;
3+
4+
namespace Yahoo.Yui.Compressor.MsBuild
5+
{
6+
using System.Collections.Generic;
7+
8+
public abstract class CompressorTask : Task
9+
{
10+
protected readonly CompressorTaskEngine TaskEngine;
11+
12+
public string LoggingType { get; set; }
13+
14+
[Required]
15+
public ITaskItem[] SourceFiles { get; set; }
16+
17+
[Required]
18+
public string OutputFile { get; set; }
19+
20+
public string CompressionType { get; set; }
21+
22+
public string EncodingType { get; set; }
23+
24+
public bool DeleteSourceFiles { get; set; }
25+
26+
public int LineBreakPosition { get; set; }
27+
28+
protected CompressorTask(ICompressor compressor)
29+
{
30+
TaskEngine = new CompressorTaskEngine(new MsBuildLogAdapter(Log), compressor) { SetTaskEngineParameters = this.SetTaskEngineParameters };
31+
DeleteSourceFiles = false;
32+
LineBreakPosition = -1;
33+
}
34+
35+
public override bool Execute()
36+
{
37+
return this.TaskEngine.Execute();
38+
}
39+
40+
protected virtual void SetTaskEngineParameters()
41+
{
42+
this.TaskEngine.CompressionType = this.CompressionType;
43+
this.TaskEngine.DeleteSourceFiles = this.DeleteSourceFiles;
44+
this.TaskEngine.EncodingType = this.EncodingType;
45+
this.TaskEngine.LineBreakPosition = this.LineBreakPosition;
46+
this.TaskEngine.LoggingType = this.LoggingType;
47+
this.TaskEngine.OutputFile = this.OutputFile;
48+
var fileSpecs = new List<FileSpec>();
49+
if (SourceFiles == null)
50+
{
51+
return;
52+
}
53+
foreach (var sourceFile in SourceFiles)
54+
{
55+
fileSpecs.Add(new FileSpec(sourceFile.ItemSpec, sourceFile.GetMetadata("CompressionType")));
56+
}
57+
this.TaskEngine.SourceFiles = fileSpecs.ToArray();
58+
}
59+
}
60+
}

0 commit comments

Comments
 (0)