Skip to content

Commit 246b502

Browse files
author
unknown
committed
styling update
1 parent 8a60ccf commit 246b502

File tree

8 files changed

+83
-103
lines changed

8 files changed

+83
-103
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Adam Stephenson
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

generators/app/index.js

+43-50
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ module.exports = yeoman.generators.Base.extend({
1212
this.argument('appname', {type: String, required: false});
1313

1414
this.option('skip-install', {
15-
desc: 'Whether dependencies should be installed',
16-
defaults: false
15+
desc: 'Whether dependencies should be installed',
16+
defaults: false
1717
});
1818

1919
this.sourceRoot(path.join(path.dirname(this.resolved), 'templates'));
2020
},
2121

22-
prompting: function () {
22+
initialization: function () {
2323
this.log(yosay(
24-
'Welcome to Tony Sneed\'s ' + chalk.yellow('Visual Studio Code TypeScript') + ' generator!'
24+
'Welcome to Adam Stephenson\'s ' + chalk.yellow('Visual Studio Code Node-TypeScript') + ' generator!'
2525
));
2626

2727
var done = this.async();
@@ -44,51 +44,44 @@ module.exports = yeoman.generators.Base.extend({
4444
},
4545

4646
writing: {
47-
project: function () {
48-
this.fs.copyTpl(
49-
this.templatePath('_package.json'),
50-
this.destinationPath('package.json'),
51-
{
52-
appname: this.appname
53-
});
54-
this.fs.copyTpl(
55-
this.templatePath('_README.md'),
56-
this.destinationPath('README.md'),
57-
{
47+
project: function () {
48+
this.fs.copyTpl(
49+
this.templatePath('_package.json'),
50+
this.destinationPath('package.json'),
51+
{
5852
appname: this.appname
59-
});
60-
},
61-
files: function () {
62-
this.copy('editorconfig', '.editorconfig');
63-
this.copy('gitattributes', '.gitattributes');
64-
this.copy('gitignore', '.gitignore');
65-
this.copy('jscsrc', '.jscsrc');
66-
this.copy('jshintrc', '.jshintrc');
67-
this.copy('travis.yml', '.travis.yml');
68-
this.copy('_gulp.config.js', 'gulp.config.js');
69-
this.copy('_gulpfile.js', 'gulpfile.js');
70-
this.copy('_karma.conf.js', 'karma.conf.js');
71-
this.copy('_LICENSE', 'LICENSE');
72-
this.copy('_SpecRunner.html', 'SpecRunner.html');
73-
this.copy('_typings.json', 'typings.json');
74-
this.copy('_tslint.json', 'tslint.json');
75-
this.copy('_tsconfig.json', 'tsconfig.json');
53+
});
54+
this.fs.copyTpl(
55+
this.templatePath('_README.md'),
56+
this.destinationPath('README.md'),
57+
{
58+
appname: this.appname
59+
});
60+
},
61+
files: function () {
62+
this.copy('editorconfig', '.editorconfig');
63+
this.copy('gitattributes', '.gitattributes');
64+
this.copy('gitignore', '.gitignore');
65+
this.copy('jscsrc', '.jscsrc');
66+
this.copy('jshintrc', '.jshintrc');
67+
this.copy('travis.yml', '.travis.yml');
68+
this.copy('_gulp.config.js', 'gulp.config.js');
69+
this.copy('_gulpfile.js', 'gulpfile.js');
70+
this.copy('_karma.conf.js', 'karma.conf.js');
71+
this.copy('_LICENSE', 'LICENSE');
72+
this.copy('_SpecRunner.html', 'SpecRunner.html');
73+
this.copy('_typings.json', 'typings.json');
74+
this.copy('_tslint.json', 'tslint.json');
75+
this.copy('_tsconfig.json', 'tsconfig.json');
76+
},
77+
directories: function () {
78+
this.directory('vscode', '.vscode');
79+
this.directory('_lib', 'lib');
80+
this.directory('_src', 'src');
81+
this.directory('_util', 'util');
82+
this.directory('_typings', 'typings');
83+
}
7684
},
77-
directories: function () {
78-
this.directory('vscode', '.vscode');
79-
this.directory('_lib', 'lib');
80-
this.directory('_src', 'src');
81-
this.directory('_util', 'util');
82-
this.directory('_typings', 'typings');
83-
}
84-
},
85-
86-
// install: function () {
87-
// this.installDependencies({
88-
// bower: false,
89-
// skipInstall: this.options['skip-install']
90-
// });
91-
// },
9285

9386
install: {
9487
npmInstall: function () {
@@ -99,7 +92,7 @@ module.exports = yeoman.generators.Base.extend({
9992
}
10093
},
10194

102-
end: function () {
103-
this.log(chalk.yellow.bold('Installation successful!'));
104-
}
95+
end: function () {
96+
this.log(chalk.yellow.bold('Installation successful!'));
97+
}
10598
});

generators/app/templates/_LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Anthony Sneed
3+
Copyright (c) 2016 Adam Stephenson
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

generators/app/templates/_SpecRunner.html

-37
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,6 @@
1212
<script src="lib/jasmine-2.4.1/jasmine.js"></script>
1313
<script src="lib/jasmine-2.4.1/jasmine-html.js"></script>
1414
<script src="util/custom.boot.js"></script>
15-
<!--<script>
16-
/* global System */
17-
// Configure systemjs to use the .js extension for imports from the src/js folder
18-
System.config({
19-
packages: {
20-
'dist': {defaultExtension: 'js'}
21-
}
22-
});
23-
24-
25-
Promise.all([
26-
System.import('./dist/greeter/greeter.spec'),
27-
System.import('./dist/italiangreeter/italiangreeter.spec')
28-
]).then(function() {
29-
console.log('donezo');
30-
31-
var jasmineEnv = jasmine.getEnv();
32-
jasmineEnv.execute();
33-
// var htmlReporter = new jasmine.HtmlReporter({
34-
// env: env,
35-
// /*onRaiseExceptionsClick: function() { queryString.navigateWithNewParam("catch", !env.catchingExceptions()); },
36-
// onThrowExpectationsClick: function() { queryString.navigateWithNewParam("throwFailures", !env.throwingExpectationFailures()); },
37-
// onRandomClick: function() { queryString.navigateWithNewParam("random", !env.randomTests()); },
38-
// addToExistingQueryString: function(key, value) { return queryString.fullStringWithNewParam(key, value); },*/
39-
// getContainer: function() { return document.body; },
40-
// createElement: function() { return document.createElement.apply(document, arguments); },
41-
// createTextNode: function() { return document.createTextNode.apply(document, arguments); },
42-
// timer: new jasmine.Timer()
43-
// });
44-
45-
// jasmineEnv.addReporter(reporter);
46-
// setTimeout(function () {
47-
// jasmineEnv.execute();
48-
// // Without this setTimeout, the specs don't always get execute in webKit browsers, I don't know why
49-
// }, 10);
50-
});
51-
</script>-->
5215

5316
<!-- inject:js -->
5417
<!-- endinject -->

generators/app/templates/_package.json

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"tslint-stylish": "^2.1.0-beta",
6161
"typescript": "^1.7.5",
6262
"typings": "^1.0.4",
63+
"watchify": "^3.7.0",
6364
"yargs": "^3.31.0"
6465
}
6566
}

gulpfile.js

+7-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
var path = require('path');
33
var gulp = require('gulp');
44
var eslint = require('gulp-eslint');
5-
var excludeGitignore = require('gulp-exclude-gitignore');
65
var mocha = require('gulp-mocha');
76
var istanbul = require('gulp-istanbul');
87
var nsp = require('gulp-nsp');
98
var plumber = require('gulp-plumber');
109

10+
var jsSrc = [
11+
'generators/app/index.js',
12+
'test/app.js'
13+
];
14+
1115
gulp.task('static', function () {
12-
return gulp.src([
13-
'generators/app/index.js',
14-
'test/app.js'
15-
])
16-
.pipe(excludeGitignore())
16+
return gulp.src(jsSrc)
1717
.pipe(eslint())
1818
.pipe(eslint.format())
1919
.pipe(eslint.failAfterError());
@@ -25,7 +25,6 @@ gulp.task('nsp', function (cb) {
2525

2626
gulp.task('pre-test', function () {
2727
return gulp.src('generators/app/index.js')
28-
.pipe(excludeGitignore())
2928
.pipe(istanbul({
3029
includeUntested: true
3130
}))
@@ -48,7 +47,7 @@ gulp.task('test', ['pre-test'], function (cb) {
4847
});
4948

5049
gulp.task('watch', function () {
51-
gulp.watch(['generators/**/*.js', 'test/**'], ['test']);
50+
gulp.watch(jsSrc, ['test']);
5251
});
5352

5453
gulp.task('prepublish', ['nsp']);

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "generator-vscode-node-typescript",
33
"version": "1.0.0",
4-
"description": "",
4+
"description": "Yeoman generator for Node-TypeScript projects using Visual Studio Code",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
@@ -10,8 +10,11 @@
1010
"type": "git",
1111
"url": "git+https://github.com/adstep/generator-vscode-node-typescript.git"
1212
},
13-
"author": "",
14-
"license": "ISC",
13+
"author": {
14+
"name": "Adam Stephenson",
15+
"email": "[email protected]"
16+
},
17+
"license": "MIT",
1518
"bugs": {
1619
"url": "https://github.com/adstep/generator-vscode-node-typescript/issues"
1720
},

test/app.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ var path = require('path');
66
var assert = require('yeoman-assert');
77
var helpers = require('yeoman-test');
88

9-
describe('generator-tonysneed-vscode-typescript:app', function () {
9+
describe('generator-vscode-node-typescript:app', function () {
1010
before (function () {
1111
return helpers.run(path.join( __dirname, '../generators/app'))
1212
.withOptions({skipInstall: true})
13-
.toPromise(); // Get a Promise back for when the generator finishes
13+
.toPromise();
1414
});
1515

16-
it('creates files', function () {
16+
it('generates files', function () {
1717
assert.file([
1818
'.vscode/launch.json',
1919
'.vscode/tasks.json',
@@ -45,7 +45,7 @@ describe('generator-tonysneed-vscode-typescript:app', function () {
4545
]);
4646
});
4747

48-
it('creates typings', function () {
48+
it('generates typings', function () {
4949
assert.file([
5050
'typings/index.d.ts',
5151
'typings/globals/jasmine/index.d.ts',

0 commit comments

Comments
 (0)