mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Matt is helping
This commit is contained in:
parent
d040d06976
commit
9d982cbcb9
3 changed files with 52 additions and 28 deletions
|
@ -16,8 +16,10 @@ var filter = require('gulp-filter');
|
||||||
var systemJSBuilder = require('systemjs-builder');
|
var systemJSBuilder = require('systemjs-builder');
|
||||||
var run = require('gulp-run');
|
var run = require('gulp-run');
|
||||||
|
|
||||||
|
var wwwroot = './wwwroot';
|
||||||
|
|
||||||
var paths = {
|
var paths = {
|
||||||
wwwroot: './wwwroot/',
|
wwwroot: wwwroot,
|
||||||
npm: { // These will be resolved automatically and copied to output directory as its name, only works for pre-bundled modules e.g. angular
|
npm: { // These will be resolved automatically and copied to output directory as its name, only works for pre-bundled modules e.g. angular
|
||||||
src: [
|
src: [
|
||||||
'@angular/animations',
|
'@angular/animations',
|
||||||
|
@ -125,8 +127,22 @@ var paths = {
|
||||||
},
|
},
|
||||||
bundle: { // This is the config for the bundler, you shouldn't need to change this
|
bundle: { // This is the config for the bundler, you shouldn't need to change this
|
||||||
root: './',
|
root: './',
|
||||||
dest: './lib/bundle.js',
|
dest: './lib/bundles/full.js',
|
||||||
|
libdest: './lib/bundles/lib.js',
|
||||||
bundle: 'app/main.js',
|
bundle: 'app/main.js',
|
||||||
|
app: 'app/**/*',
|
||||||
|
config: {
|
||||||
|
baseURL: wwwroot,
|
||||||
|
packages: {
|
||||||
|
'.': {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
paths: {
|
||||||
|
'*': 'lib/*',
|
||||||
|
'app/*': 'app/*'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,26 +245,37 @@ gulp.task('sass', function () {
|
||||||
.pipe(gulp.dest(path.join(paths.wwwroot, paths.sass.dest)))
|
.pipe(gulp.dest(path.join(paths.wwwroot, paths.sass.dest)))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// This bundles the entire application and libraries for deployment
|
||||||
gulp.task('bundle', function () {
|
gulp.task('bundle', function () {
|
||||||
var builder = new systemJSBuilder(paths.bundle.root);
|
var builder = new systemJSBuilder(paths.bundle.root);
|
||||||
builder.config({
|
builder.config(paths.bundle.config);
|
||||||
baseURL: paths.wwwroot,
|
|
||||||
packages: {
|
|
||||||
'.': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
paths: {
|
|
||||||
'*': 'lib/*',
|
|
||||||
'app/*': 'app/*'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
del.sync(path.join(paths.wwwroot, paths.bundle.dest), { force: true });
|
del.sync(path.join(paths.wwwroot, paths.bundle.dest), { force: true });
|
||||||
return builder.bundle(paths.bundle.bundle, path.join(paths.wwwroot, paths.bundle.dest), {
|
return builder.bundle(paths.bundle.bundle, path.join(paths.wwwroot, paths.bundle.dest), {
|
||||||
sourceMaps: true
|
sourceMaps: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// This bundles only third party dependencies for development
|
||||||
|
gulp.task('bundlelib', function () {
|
||||||
|
var builder = new systemJSBuilder(paths.bundle.root);
|
||||||
|
builder.config(paths.bundle.config);
|
||||||
|
del.sync(path.join(paths.wwwroot, paths.bundle.libdest), { force: true });
|
||||||
|
return builder.bundle(paths.bundle.bundle + ' - [' + paths.bundle.app + ']', path.join(paths.wwwroot, paths.bundle.libdest), {
|
||||||
|
sourceMaps: global.full
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('clean', function () {
|
||||||
|
return del([
|
||||||
|
paths.sass.dest,
|
||||||
|
paths.lib.dest,
|
||||||
|
paths.bundle.dest,
|
||||||
|
...paths.modules.map(m => m.dest)
|
||||||
|
].map(x => path.join(paths.wwwroot, x)), { force: true });
|
||||||
|
})
|
||||||
|
|
||||||
gulp.task('typescript', function () {
|
gulp.task('typescript', function () {
|
||||||
return run('tsc').exec();
|
return run('tsc').exec();
|
||||||
});
|
});
|
||||||
|
@ -256,9 +283,9 @@ gulp.task('typescript', function () {
|
||||||
gulp.task('fullvar', () => { global.full = true });
|
gulp.task('fullvar', () => { global.full = true });
|
||||||
gulp.task('libs')
|
gulp.task('libs')
|
||||||
gulp.task('copy', ['lib', 'libcss', 'libfonts', 'libimages', 'npm', 'modules']);
|
gulp.task('copy', ['lib', 'libcss', 'libfonts', 'libimages', 'npm', 'modules']);
|
||||||
gulp.task('compile', ['sass']);
|
gulp.task('compile', callback => runSequence('copy', 'sass', callback));
|
||||||
gulp.task('build', callback => runSequence('copy', 'compile', callback));
|
gulp.task('build', callback => runSequence('compile', 'bundlelib', callback));
|
||||||
gulp.task('full', callback => runSequence('build', callback));
|
gulp.task('full', callback => runSequence('clean', 'compile', callback));
|
||||||
|
|
||||||
// Use this in a build server environment to compile and bundle everything
|
// Use this in a build server environment to compile and bundle everything
|
||||||
gulp.task('publish', callback => runSequence('fullvar', 'full', 'typescript', 'bundle', callback));
|
gulp.task('publish', callback => runSequence('fullvar', 'full', 'typescript', 'bundle', callback));
|
||||||
|
|
|
@ -10,11 +10,7 @@
|
||||||
map: { app: '../app' }
|
map: { app: '../app' }
|
||||||
})
|
})
|
||||||
|
|
||||||
if (config.bundle) {
|
System.import(config.bundle ? 'bundles/full' : 'bundles/lib').then(() => {
|
||||||
System.import('bundle').then(() => {
|
System.import('/app/main');
|
||||||
System.import('/app/main');
|
})
|
||||||
})
|
|
||||||
} else {
|
|
||||||
System.import('/app/main')
|
|
||||||
}
|
|
||||||
});
|
});
|
|
@ -1,6 +1,6 @@
|
||||||
version: 3.0.{build}
|
version: 3.0.{build}
|
||||||
configuration: Release
|
configuration: Release
|
||||||
os: Visual Studio 2015 Preview
|
os: Visual Studio 2017
|
||||||
assembly_info:
|
assembly_info:
|
||||||
patch: true
|
patch: true
|
||||||
file: '**\AssemblyInfo.*'
|
file: '**\AssemblyInfo.*'
|
||||||
|
@ -11,11 +11,12 @@ before_build:
|
||||||
- cmd: cd ombi/ombi
|
- cmd: cd ombi/ombi
|
||||||
- appveyor-retry dotnet restore
|
- appveyor-retry dotnet restore
|
||||||
- appveyor-retry npm install bower -g
|
- appveyor-retry npm install bower -g
|
||||||
#- appveyor-retry npm install -g gulp
|
- appveyor-retry npm install -g gulp
|
||||||
- appveyor-retry npm install -g typescript
|
#- appveyor-retry npm install -g typescript
|
||||||
- appveyor-retry npm install
|
- appveyor-retry npm install
|
||||||
- appveyor-retry bower install
|
- appveyor-retry bower install
|
||||||
#- gulp publish
|
- gulp publish
|
||||||
|
- node --version
|
||||||
build_script:
|
build_script:
|
||||||
- dotnet build
|
- dotnet build
|
||||||
after_build:
|
after_build:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue