This repository was archived by the owner on Jun 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
3,432 additions
and
505 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -49,3 +49,6 @@ artifacts | |
# Nodejs et bower | ||
node_modules | ||
bower_components | ||
|
||
# dist www folder | ||
wwwroot |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
} |
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict'; | ||
var GulpConfig = (function () { | ||
function gulpConfig() { | ||
//Got tired of scrolling through all the comments so removed them | ||
//Don't hurt me AC :-) | ||
this.source = './src/'; | ||
this.sourceApp = this.source + 'app/'; | ||
this.output = './wwwroot/'; | ||
this.tsOutputPath = this.output + '/app/'; | ||
this.allJavaScript = [this.sourceApp + '/**/*.js']; | ||
this.allTypeScript = this.sourceApp + '/**/*.ts'; | ||
this.allHtml = [this.source + '/**/*.html', this.source + '/**/*.css', this.source + '/**/*.ico']; | ||
|
||
this.typings = './typings/'; | ||
this.libraryTypeScriptDefinitions = this.typings + '/**/*.ts'; | ||
} | ||
return gulpConfig; | ||
})(); | ||
module.exports = GulpConfig; |
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'), | ||
debug = require('gulp-debug'), | ||
inject = require('gulp-inject'), | ||
tsc = require('gulp-typescript'), | ||
tslint = require('gulp-tslint'), | ||
sourcemaps = require('gulp-sourcemaps'), | ||
del = require('del'), | ||
Config = require('./gulpfile.config'), | ||
tsProject = tsc.createProject('tsconfig.json'), | ||
browserSync = require('browser-sync'), | ||
superstatic = require('superstatic'); | ||
|
||
var config = new Config(); | ||
|
||
/** | ||
* Generates the app.d.ts references file dynamically from all application *.ts files. | ||
*/ | ||
// gulp.task('gen-ts-refs', function () { | ||
// var target = gulp.src(config.appTypeScriptReferences); | ||
// var sources = gulp.src([config.allTypeScript], {read: false}); | ||
// return target.pipe(inject(sources, { | ||
// starttag: '//{', | ||
// endtag: '//}', | ||
// transform: function (filepath) { | ||
// return '/// <reference path="../..' + filepath + '" />'; | ||
// } | ||
// })).pipe(gulp.dest(config.typings)); | ||
// }); | ||
|
||
|
||
gulp.task('html', function () { | ||
return gulp.src(config.allHtml).pipe(gulp.dest(config.output)); | ||
}); | ||
|
||
/** | ||
* Lint all custom TypeScript files. | ||
*/ | ||
gulp.task('ts-lint', function () { | ||
return gulp.src(config.allTypeScript).pipe(tslint()).pipe(tslint.report('prose')); | ||
}); | ||
|
||
/** | ||
* Compile TypeScript and include references to library and app .d.ts files. | ||
*/ | ||
gulp.task('compile-ts', function () { | ||
var sourceTsFiles = [config.allTypeScript, //path to typescript files | ||
config.libraryTypeScriptDefinitions]; //reference to library .d.ts files | ||
|
||
|
||
var tsResult = gulp.src(sourceTsFiles) | ||
.pipe(sourcemaps.init()) | ||
.pipe(tsc(tsProject)); | ||
|
||
tsResult.dts.pipe(gulp.dest(config.tsOutputPath)); | ||
return tsResult.js | ||
.pipe(sourcemaps.write('.')) | ||
.pipe(gulp.dest(config.tsOutputPath)); | ||
}); | ||
|
||
/** | ||
* Remove all generated JavaScript files from TypeScript compilation. | ||
*/ | ||
gulp.task('clean-ts', function (cb) { | ||
var typeScriptGenFiles = [ | ||
config.tsOutputPath +'/**/*.js', // path to all JS files auto gen'd by editor | ||
config.tsOutputPath +'/**/*.js.map', // path to all sourcemap files auto gen'd by editor | ||
'!' + config.tsOutputPath + '/lib' | ||
]; | ||
|
||
// delete the files | ||
del(typeScriptGenFiles, cb); | ||
}); | ||
|
||
gulp.task('watch', function() { | ||
gulp.watch([config.allTypeScript, config.AllHtml], ['compile-ts', 'html']); | ||
}); | ||
|
||
gulp.task('serve', ['compile-ts','html'], function() { | ||
process.stdout.write('Starting browserSync and superstatic...\n'); | ||
var bs = browserSync.create(); | ||
bs.init({ | ||
port: 3000, | ||
files: ['**/*.html', '**/*.js', '**/*.css'], | ||
injectChanges: true, | ||
logFileChanges: false, | ||
logLevel: 'silent', | ||
logPrefix: 'angularin20typescript', | ||
notify: true, | ||
reloadDelay: 0, | ||
server: { | ||
baseDir: './wwwroot', | ||
//middleware: superstatic({ debug: false}) | ||
} | ||
}); | ||
}); | ||
|
||
gulp.task('default', ['compile-ts']); |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "calculette-rh", | ||
"version": "1.0.0", | ||
"private": true, | ||
"devDependencies": { | ||
"browser-sync": "^2.10.0", | ||
"del": "^2.1.0", | ||
"grunt": "0.4.5", | ||
"gulp": "^3.8.11", | ||
"gulp-debug": "^2.0.1", | ||
"gulp-inject": "^1.2.0", | ||
"gulp-rimraf": "^0.1.1", | ||
"gulp-sourcemaps": "^1.5.1", | ||
"gulp-tslint": "^1.4.4", | ||
"gulp-typescript": "^2.5.0", | ||
"superstatic": "^3.0.0" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.