Skip to content
This repository was archived by the owner on Jun 20, 2021. It is now read-only.

Commit

Permalink
Refonte architecture de l'appli
Browse files Browse the repository at this point in the history
  • Loading branch information
bgarel committed Dec 3, 2015
1 parent e233cbf commit 78449d6
Show file tree
Hide file tree
Showing 45 changed files with 3,432 additions and 505 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ artifacts
# Nodejs et bower
node_modules
bower_components

# dist www folder
wwwroot
3 changes: 3 additions & 0 deletions .vscode/settings.json
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.
19 changes: 19 additions & 0 deletions gulpfile.config.js
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;
99 changes: 99 additions & 0 deletions gulpfile.js
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']);
18 changes: 18 additions & 0 deletions package.json
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"
}
}
22 changes: 0 additions & 22 deletions source/CalculetteRH.WebUI/CalculetteRH.WebUI.kproj

This file was deleted.

8 changes: 0 additions & 8 deletions source/CalculetteRH.WebUI/CalculetteRH.WebUI.kproj.user

This file was deleted.

204 changes: 0 additions & 204 deletions source/CalculetteRH.WebUI/Project_Readme.html

This file was deleted.

Loading

0 comments on commit 78449d6

Please sign in to comment.