Skip to content
This repository was archived by the owner on Feb 13, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,13 @@ var AspnetGenerator = yeoman.generators.Base.extend({
break;
case 'webbasic':
this.sourceRoot(path.join(__dirname, '../templates/projects/' + this.type));
// Grunt or Gulp
if (this.options.grunt) {
this.fs.copyTpl(this.templatePath('Gruntfile.js'), this.applicationName + '/Gruntfile.js', this.templatedata);
} else {
this.fs.copyTpl(this.templatePath('gulpfile.js'), this.applicationName + '/gulpfile.js', this.templatedata);
}
// individual files (configs, etc)
this.fs.copyTpl(this.sourceRoot() + '/../../Dockerfile.txt', this.applicationName + '/Dockerfile', this.templatedata);
this.fs.copy(this.templatePath('.bowerrc'), this.applicationName + '/.bowerrc');
this.fs.copy(this.templatePath('bundleconfig.json'), this.applicationName + '/bundleconfig.json');
this.fs.copy(this.sourceRoot() + '/../../gitignore.txt', this.applicationName + '/.gitignore');
this.fs.copyTpl(this.templatePath('bower.json'), this.applicationName + '/bower.json', this.templatedata);
this.fs.copyTpl(this.templatePath('appsettings.json'), this.applicationName + '/appsettings.json', this.templatedata);
this.fs.copyTpl(this.templatePath('package.json'), this.applicationName + '/package.json', this.templatedata);
this.fs.copyTpl(this.templatePath('project.json'), this.applicationName + '/project.json', this.templatedata);
this.fs.copyTpl(this.templatePath('Program.cs'), this.applicationName + '/Program.cs', this.templatedata);
// Properties
Expand Down Expand Up @@ -343,7 +337,7 @@ var AspnetGenerator = yeoman.generators.Base.extend({
if(!this.options['skip-install'] && (this.type === 'web' || this.type === 'webbasic')) {
process.chdir(this.applicationName);
this.installDependencies({
npm: true,
npm: false,
bower: true,
callback: this._showUsageHints.bind(this)
});
Expand Down
29 changes: 29 additions & 0 deletions templates/overrides/semantic/webbasic/bundleconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[
{
"outputFileName": "wwwroot/css/site.min.css",
"inputFiles": [
"wwwroot/css/site.css"
],
"minify": {
"enabled": true
}
},
{
"outputFileName": "wwwroot/js/site.min.js",
"inputFiles": [
"wwwroot/js/site.js"
],
"minify": {
"enabled": true
}
},
{
"outputFileName": "wwwroot/js/semantic.validation.min.js",
"inputFiles": [
"wwwroot/js/semantic.validation.js"
],
"minify": {
"enabled": true
}
}
]
10 changes: 0 additions & 10 deletions templates/projects/webbasic/Gruntfile.js

This file was deleted.

20 changes: 20 additions & 0 deletions templates/projects/webbasic/bundleconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"outputFileName": "wwwroot/css/site.min.css",
"inputFiles": [
"wwwroot/css/site.css"
],
"minify": {
"enabled": true
}
},
{
"outputFileName": "wwwroot/js/site.min.js",
"inputFiles": [
"wwwroot/js/site.js"
],
"minify": {
"enabled": true
}
}
]
45 changes: 0 additions & 45 deletions templates/projects/webbasic/gulpfile.js

This file was deleted.

13 changes: 0 additions & 13 deletions templates/projects/webbasic/package.json

This file was deleted.

9 changes: 8 additions & 1 deletion templates/projects/webbasic/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
},

"tools": {
"BundlerMinifier.Core": {
"version": "2.0.208",
"imports": [
"portable-net45+win8+dnxcore50",
"portable-net40+sl5+win8+wp8+wpa81"
]
},
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
Expand Down Expand Up @@ -68,7 +75,7 @@
},

"scripts": {
"prepublish": [ "npm install", "bower install"<% if(!grunt){ %>, "gulp clean", "gulp min"<% } %> ],
"prepublish": [ "bower install" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},

Expand Down
52 changes: 1 addition & 51 deletions test/test-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,53 +555,6 @@ describe('aspnet - Web Application (Semantic UI)', function() {

});


/*
* yo aspnet Web Application Basic - Grunt option
*/
describe('aspnet - Web Application Basic w/grunt', function() {

util.goCreateApplicationWithOptions('webbasic', 'gruntTest', 'bootstrap', {
grunt: 'grunt'
});

describe('Checking directories', function() {
it('Application directory created', function() {
assert.file('gruntTest/');
});

it('grunt file created', function() {
assert.file('gruntTest/Gruntfile.js');
});

it('gulpfile does NOT exist', function() {
assert.noFile('gruntTest/gulpfile.js');
});
});
});

/*
* yo aspnet Web Application Basic - No Grunt option
*/
describe('aspnet - Web Application Basic w/o grunt', function() {

util.goCreateApplication('webbasic', 'gulpTest');

describe('Checking directories', function() {
it('Application directory created', function() {
assert.file('gulpTest/');
});

it('gulp file created', function() {
assert.file('gulpTest/gulpfile.js');
});

it('grunt file does NOT exist', function() {
assert.noFile('gulpTest/Gruntfile.js');
});
});
});

/*
* yo aspnet Web Application (Bootstrap)
*/
Expand Down Expand Up @@ -658,10 +611,9 @@ describe('aspnet - Web Application Basic (Bootstrap)', function() {
'webTest/.bowerrc',
'webTest/.gitignore',
'webTest/bower.json',
'webTest/bundleconfig.json',
'webTest/appsettings.json',
'webTest/Controllers/HomeController.cs',
'webTest/gulpfile.js',
'webTest/package.json',
'webTest/Program.cs',
'webTest/project.json',
'webTest/Properties/launchSettings.json',
Expand Down Expand Up @@ -759,8 +711,6 @@ describe('aspnet - Web Application Basic (Semantic UI)', function() {
'webTest/bower.json',
'webTest/appsettings.json',
'webTest/Controllers/HomeController.cs',
'webTest/gulpfile.js',
'webTest/package.json',
'webTest/Program.cs',
'webTest/project.json',
'webTest/Properties/launchSettings.json',
Expand Down