Skip to content

Commit dfd0a9c

Browse files
committed
Adds the beginning source code
Not complete yet, had to commit for computer reinstallation.
1 parent e175f2f commit dfd0a9c

25 files changed

+1153
-8
lines changed

.editorconfig

Whitespace-only changes.

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.sln.docstates
8+
9+
# Build results
10+
[Dd]ebug/
11+
[Dd]ebugPublic/
12+
[Rr]elease/
13+
x64/
14+
build/
15+
bld/
16+
[Bb]in/
17+
[Oo]bj/
18+
19+
# Roslyn cache directories
20+
*.ide/
21+
22+
# MSTest test Results
23+
[Tt]est[Rr]esult*/
24+
[Bb]uild[Ll]og.*
25+
26+
#NUNIT
27+
*.VisualState.xml
28+
TestResult.xml
29+
30+
# Build Results of an ATL Project
31+
[Dd]ebugPS/
32+
[Rr]eleasePS/
33+
dlldata.c
34+
35+
*_i.c
36+
*_p.c
37+
*_i.h
38+
*.ilk
39+
*.meta
40+
*.obj
41+
*.pch
42+
*.pdb
43+
*.pgc
44+
*.pgd
45+
*.rsp
46+
*.sbr
47+
*.tlb
48+
*.tli
49+
*.tlh
50+
*.tmp
51+
*.tmp_proj
52+
*.log
53+
*.vspscc
54+
*.vssscc
55+
.builds
56+
*.pidb
57+
*.svclog
58+
*.scc
59+
60+
# Chutzpah Test files
61+
_Chutzpah*
62+
63+
# Visual C++ cache files
64+
ipch/
65+
*.aps
66+
*.ncb
67+
*.opensdf
68+
*.sdf
69+
*.cachefile
70+
71+
# Visual Studio profiler
72+
*.psess
73+
*.vsp
74+
*.vspx
75+
76+
# TFS 2012 Local Workspace
77+
$tf/
78+
79+
# Guidance Automation Toolkit
80+
*.gpState
81+
82+
# ReSharper is a .NET coding add-in
83+
_ReSharper*/
84+
*.[Rr]e[Ss]harper
85+
*.DotSettings.user
86+
87+
# JustCode is a .NET coding addin-in
88+
.JustCode
89+
90+
# TeamCity is a build add-in
91+
_TeamCity*
92+
93+
# DotCover is a Code Coverage Tool
94+
*.dotCover
95+
96+
# NCrunch
97+
_NCrunch_*
98+
.*crunch*.local.xml
99+
100+
# MightyMoose
101+
*.mm.*
102+
AutoTest.Net/
103+
104+
# Web workbench (sass)
105+
.sass-cache/
106+
107+
# Installshield output folder
108+
[Ee]xpress/
109+
110+
# DocProject is a documentation generator add-in
111+
DocProject/buildhelp/
112+
DocProject/Help/*.HxT
113+
DocProject/Help/*.HxC
114+
DocProject/Help/*.hhc
115+
DocProject/Help/*.hhk
116+
DocProject/Help/*.hhp
117+
DocProject/Help/Html2
118+
DocProject/Help/html
119+
120+
# Click-Once directory
121+
publish/
122+
123+
# Publish Web Output
124+
*.[Pp]ublish.xml
125+
*.azurePubxml
126+
## TODO: Comment the next line if you want to checkin your
127+
## web deploy settings but do note that will include unencrypted
128+
## passwords
129+
#*.pubxml
130+
131+
# NuGet Packages Directory
132+
packages/*
133+
## TODO: If the tool you use requires repositories.config
134+
## uncomment the next line
135+
#!packages/repositories.config
136+
137+
# Enable "build/" folder in the NuGet Packages folder since
138+
# NuGet packages use it for MSBuild targets.
139+
# This line needs to be after the ignore of the build folder
140+
# (and the packages folder if the line above has been uncommented)
141+
!packages/build/
142+
143+
# Windows Azure Build Output
144+
csx/
145+
*.build.csdef
146+
147+
# Windows Store app package directory
148+
AppPackages/
149+
150+
# Others
151+
sql/
152+
*.Cache
153+
ClientBin/
154+
[Ss]tyle[Cc]op.*
155+
~$*
156+
*~
157+
*.dbmdl
158+
*.dbproj.schemaview
159+
*.pfx
160+
*.publishsettings
161+
node_modules/
162+
bower_components/
163+
164+
# RIA/Silverlight projects
165+
Generated_Code/
166+
167+
# Backup & report files from converting an old project file
168+
# to a newer Visual Studio version. Backup files are not needed,
169+
# because we have git ;-)
170+
_UpgradeReport_Files/
171+
Backup*/
172+
UpgradeLog*.XML
173+
UpgradeLog*.htm
174+
175+
# SQL Server files
176+
*.mdf
177+
*.ldf
178+
179+
# Business Intelligence projects
180+
*.rdl.data
181+
*.bim.layout
182+
*.bim_*.settings
183+
184+
# Microsoft Fakes
185+
FakesAssemblies/
186+
187+
# LightSwitch generated files
188+
GeneratedArtifacts/
189+
_Pvt_Extensions/
190+
ModelManifest.xml
191+
192+
# ASP.NET 5 dnx
193+
project.lock.json
194+
.vs/
195+
196+
# ASP.NET 5 output folder
197+
wwwroot/

.jshintrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"bitwise": true,
3+
"curly": true,
4+
"esnext": true,
5+
"immed": true,
6+
"newcap": true,
7+
"noarg": true,
8+
"node": true,
9+
"strict": true,
10+
"undef": true,
11+
"unused": "vars"
12+
}

README.md

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,36 @@
11
# aspnet-template
22
Improved [Visual Studio 2015](https://www.visualstudio.com/) project template for [ASP.NET 5](http://www.asp.net/).
33

4-
**Release date: 20th of July 2015** (when Visual Studio 2015 is released).
5-
64
While the built in ASP.NET 5 (beta) project template in Visual Studio 2015 comes with basic Gulp script,
75
this repository contains an extended and improved template that you can copy and use for your own projects.
86

7+
Template is designed as a starting point for building large scale Angular applications. It includes dynamic (lazy) loading
8+
of modules (features) and individual complication of those modules. This is a Single Page Application template where
9+
all the ASP.NET Razor files (.cshtml) have been removed and is no longer in use.
10+
911
Template is optimized for performance of the final results, with only two files for scripts and two files for styles,
10-
this will reduce the loading time for your web apps compared to loading individual components.
12+
this will reduce the loading time for your web apps compared to loading individual components. Individual modules are
13+
additionally compiled down to two files and lazy loaded upon request.
1114

1215
Source maps ensures great debugging capability while developing, even when referencing the minified versions of outputs.
1316

1417
Need to learn more about gulp to fully understand what's going on? Read [Building With Gulp](http://www.smashingmagazine.com/2014/06/11/building-with-gulp/).
1518

19+
## Documentation
20+
21+
### Ports
22+
The template utilizes DNX for hosting and not IIS Express, which is default with the standard ASP.NET 5 beta project template.
23+
Additionally is the Launch URL when running with F5 configured to launch the BrowserSync page and not directly the DNX hosted
24+
page.
25+
26+
Following ports are standard with the template:
27+
28+
http://localhost:7600/ - DNX hosted ASP.NET 5 web app.
29+
http://localhost:7601/ - BrowserSync proxy URL. Launch URL from F5 (start) and Gulp script.
30+
http://localhost:7602/ - BrowserSync settings URL.
31+
32+
Why these ports? There are no widely known applications or services which uses them, so was choosen to avoid any potential conflicts.
33+
1634
## Introduction
1735

1836
Visual Studio 2015 makes a big change for web developers, moving away from NuGet packages for client dependencies and
@@ -22,6 +40,9 @@ we created this improved project template that you can copy as needed from.
2240
It's based upon regular JavaScript for your scripts, and uses [Sassy CSS](http://sass-lang.com/) (SCSS) for styling. If you want to change to
2341
regular CSS or another style language, there are plenty of Gulp tasks available to do that.
2442

43+
If you want to use TypeScript as oppose to JavaScript, it's a fairly easy task to customize the template so it uses
44+
the available TypeScript compiler NPM package and changes the Gulp script filters from .js to .ts.
45+
2546
## Gulp Tasks
2647

2748
**build** Builds everything. This is run automatically on opening project in Visual Studio.
@@ -40,11 +61,7 @@ regular CSS or another style language, there are plenty of Gulp tasks available
4061

4162
**browser:sync** Hosts the BrowserSync plugin as a proxy for your ASP.NET 5 web app.
4263

43-
**clean** Cleans all the output directories.
44-
45-
**clean:css** Cleans the styles directory.
46-
47-
**clean:js** Cleans the scripts directory.
64+
**clean** Cleans the entire output directory, which is the wwwroot. Make sure you never add files to the wwwroot directly.
4865

4966
## Common Tasks
5067
Here are some of the commons developer tasks explained and how the workflow for developing with this template can be done.
@@ -91,6 +108,27 @@ code. BrowserSync acts as a pass-through proxy between ASP.NET (hosting your app
91108
A: Go into the properties on your ASP.NET 5 web project, then the Debug tab. In the IIS Express Setting section,
92109
set your wanted port number. This number must be added to your gulpfile.js for BrowserSync to work.
93110

111+
*Q: Why such as large single gulpfile?*
112+
113+
A: While there are many ways to organize your Gulp scripts, with folders and automatic loading, this template is
114+
implemented with a single script file for all of the Gulp tasks. This is done to reduce amount of files and might be
115+
a bit easier for beginners to learn.
116+
117+
*Q: Why are external (library) dependencies only in lib.js?*
118+
119+
A: Most of the time, the external (library) dependencies are used all across your modules. To reduce build time
120+
and complexity of Gulp scripts, all of the external dependencies should be specified in the lib.js and not within
121+
individual sub-modules.
122+
123+
*Q: Why not read files directly from node_modules folder?*
124+
125+
A: By relying on Browserify, the required JavaScript files for each individual external library is automatically
126+
resolved. So if a library changes, e.g. splits into multiple files, you don't need to worry.
127+
128+
*Q: Downloading NPM packages seems to take a long time?*
129+
130+
A: This project template utilizes many NPM packages so there is a lot of files to download. Most of the packages
131+
are themselves dependent on other packages, so in total there are many thousands of unpackaged files.
94132

95133

96134
## License

0 commit comments

Comments
 (0)