diff --git a/.gitignore b/.gitignore
index bd5b618c3..4dc71476c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -120,7 +120,7 @@ _tests/
setup/Output/
*.~is
-UI.Phantom/
+UI/
#VS outout folders
bin
diff --git a/build.sh b/build.sh
index cede3c535..956cabdda 100755
--- a/build.sh
+++ b/build.sh
@@ -95,12 +95,8 @@ RunGulp()
ProgressEnd 'yarn install'
echo "##teamcity[progressStart 'Running gulp']"
- CheckExitCode npm run build
+ CheckExitCode yarn run build --production
echo "##teamcity[progressFinish 'Running gulp']"
-
- echo "##teamcity[progressStart 'Running gulp (phantom)']"
- CheckExitCode yarn run build -- --production
- echo "##teamcity[progressFinish 'Running gulp (phantom)']"
}
CreateMdbs()
diff --git a/gulp/build.js b/gulp/build.js
deleted file mode 100644
index 23f457baf..000000000
--- a/gulp/build.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var gulp = require('gulp');
-var runSequence = require('run-sequence');
-
-require('./clean');
-require('./less');
-require('./handlebars');
-require('./copy');
-
-gulp.task('build', function() {
- return runSequence('clean', [
- 'webpack',
- 'less',
- 'handlebars',
- 'copyHtml',
- 'copyContent',
- 'copyJs'
- ]);
-});
diff --git a/gulp/clean.js b/gulp/clean.js
deleted file mode 100644
index 73b5868a2..000000000
--- a/gulp/clean.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var gulp = require('gulp');
-var del = require('del');
-
-var paths = require('./paths');
-
-gulp.task('clean', function() {
- return del([paths.dest.root]);
-});
diff --git a/gulp/copy.js b/gulp/copy.js
deleted file mode 100644
index 9962defef..000000000
--- a/gulp/copy.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var gulp = require('gulp');
-var print = require('gulp-print');
-var cache = require('gulp-cached');
-var livereload = require('gulp-livereload');
-
-var paths = require('./paths.js');
-
-gulp.task('copyJs', function () {
- return gulp.src(
- [
- paths.src.root + 'polyfills.js',
- paths.src.root + 'JsLibraries/handlebars.runtime.js'
- ])
- .pipe(cache('copyJs'))
- .pipe(print())
- .pipe(gulp.dest(paths.dest.root))
- .pipe(livereload());
-});
-
-gulp.task('copyHtml', function () {
- return gulp.src(paths.src.html)
- .pipe(cache('copyHtml'))
- .pipe(gulp.dest(paths.dest.root))
- .pipe(livereload());
-});
-
-gulp.task('copyContent', function () {
- return gulp.src([paths.src.content + '**/*.*', '!**/*.less', '!**/*.css'])
- .pipe(gulp.dest(paths.dest.content))
- .pipe(livereload());
-});
diff --git a/gulp/errorHandler.js b/gulp/errorHandler.js
deleted file mode 100644
index db24e1a66..000000000
--- a/gulp/errorHandler.js
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- onError : function(error) {
- //If you want details of the error in the console
- console.log(error.toString());
- this.emit('end');
- }
-};
\ No newline at end of file
diff --git a/gulp/gulpFile.js b/gulp/gulpFile.js
deleted file mode 100644
index fd48cf1b0..000000000
--- a/gulp/gulpFile.js
+++ /dev/null
@@ -1,10 +0,0 @@
-require('./watch.js');
-require('./build.js');
-require('./clean.js');
-require('./handlebars.js');
-require('./copy.js');
-require('./less.js');
-require('./stripBom.js');
-require('./imageMin.js');
-require('./webpack.js');
-require('./start.js');
diff --git a/gulp/handlebars.js b/gulp/handlebars.js
deleted file mode 100644
index aab62f438..000000000
--- a/gulp/handlebars.js
+++ /dev/null
@@ -1,55 +0,0 @@
-var gulp = require('gulp');
-var handlebars = require('gulp-handlebars');
-var declare = require('gulp-declare');
-var concat = require('gulp-concat');
-var wrap = require("gulp-wrap");
-var livereload = require('gulp-livereload');
-var path = require('path');
-var streamqueue = require('streamqueue');
-var stripbom = require('gulp-stripbom');
-
-var paths = require('./paths.js');
-
-gulp.task('handlebars', function() {
-
- var coreStream = gulp.src([
- paths.src.templates,
- '!*/**/*Partial.*'
- ])
- .pipe(stripbom({ showLog : false }))
- .pipe(handlebars())
- .pipe(declare({
- namespace : 'T',
- noRedeclare : true,
- processName : function(filePath) {
-
- filePath = path.relative(paths.src.root, filePath);
-
- return filePath.replace(/\\/g, '/')
- .toLocaleLowerCase()
- .replace('template', '')
- .replace('.js', '');
- }
- }));
-
- var partialStream = gulp.src([paths.src.partials])
- .pipe(stripbom({ showLog : false }))
- .pipe(handlebars())
- .pipe(wrap('Handlebars.template(<%= contents %>)'))
- .pipe(wrap('Handlebars.registerPartial(<%= processPartialName(file.relative) %>, <%= contents %>)', {}, {
- imports : {
- processPartialName : function(fileName) {
- return JSON.stringify(
- path.basename(fileName, '.js')
- );
- }
- }
- }));
-
- return streamqueue({ objectMode : true },
- partialStream,
- coreStream
- ).pipe(concat('templates.js'))
- .pipe(gulp.dest(paths.dest.root))
- .pipe(livereload());
-});
diff --git a/gulp/imageMin.js b/gulp/imageMin.js
deleted file mode 100644
index 6c8236e03..000000000
--- a/gulp/imageMin.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var gulp = require('gulp');
-var print = require('gulp-print');
-var paths = require('./paths.js');
-
-gulp.task('imageMin', function() {
- var imagemin = require('gulp-imagemin');
- return gulp.src(paths.src.images)
- .pipe(imagemin({
- progressive : false,
- optimizationLevel : 4,
- svgoPlugins : [{ removeViewBox : false }]
- }))
- .pipe(print())
- .pipe(gulp.dest(paths.src.content + 'Images/'));
-});
\ No newline at end of file
diff --git a/gulp/less.js b/gulp/less.js
deleted file mode 100644
index 380f81363..000000000
--- a/gulp/less.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var gulp = require('gulp');
-
-var less = require('gulp-less');
-var postcss = require('gulp-postcss');
-var sourcemaps = require('gulp-sourcemaps');
-var autoprefixer = require('autoprefixer');
-var livereload = require('gulp-livereload');
-var cleancss = require('gulp-clean-css');
-var print = require('gulp-print');
-var paths = require('./paths');
-var errorHandler = require('./errorHandler');
-
-gulp.task('less', function() {
-
- var src = [
- paths.src.content + 'bootstrap.less',
- paths.src.content + 'theme.less',
- paths.src.content + 'overrides.less',
- paths.src.content + 'bootstrap.toggle-switch.css',
- paths.src.content + 'fullcalendar.css',
- paths.src.content + 'Messenger/messenger.css',
- paths.src.content + 'Messenger/messenger.flat.css',
- paths.src.root + 'Series/series.less',
- paths.src.root + 'Activity/activity.less',
- paths.src.root + 'AddSeries/addSeries.less',
- paths.src.root + 'Calendar/calendar.less',
- paths.src.root + 'Cells/cells.less',
- paths.src.root + 'ManualImport/manualimport.less',
- paths.src.root + 'Settings/settings.less',
- paths.src.root + 'System/Logs/logs.less',
- paths.src.root + 'System/Update/update.less',
- paths.src.root + 'System/Info/info.less'
- ];
-
- return gulp.src(src)
- .pipe(print())
- .pipe(sourcemaps.init())
- .pipe(less({
- dumpLineNumbers : 'false',
- compress : false,
- yuicompress : false,
- ieCompat : true,
- strictImports : true
- }))
- .pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
- .pipe(cleancss())
- .on('error', errorHandler.onError)
- .pipe(sourcemaps.write(paths.dest.content))
- .pipe(gulp.dest(paths.dest.content))
- .pipe(livereload());
-});
diff --git a/gulp/paths.js b/gulp/paths.js
deleted file mode 100644
index e05aa1d2b..000000000
--- a/gulp/paths.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var paths = {
- src : {
- root : './src/UI/',
- templates : './src/UI/**/*.hbs',
- html : './src/UI/*.html',
- partials : './src/UI/**/*Partial.hbs',
- scripts : './src/UI/**/*.js',
- less : ['./src/UI/**/*.less'],
- content : './src/UI/Content/',
- images : './src/UI/Content/Images/**/*',
- exclude : {
- libs : '!./src/UI/JsLibraries/**'
- }
- },
- dest : {
- root : './_output/UI/',
- content : './_output/UI/Content/'
- }
-};
-
-module.exports = paths;
diff --git a/gulp/start.js b/gulp/start.js
deleted file mode 100644
index 5b5f88044..000000000
--- a/gulp/start.js
+++ /dev/null
@@ -1,112 +0,0 @@
-// will download and run sonarr (server) in a non-windows enviroment
-// you can use this if you don't care about the server code and just want to work
-// with the web code.
-
-var http = require('http');
-var gulp = require('gulp');
-var fs = require('fs');
-var targz = require('tar.gz');
-var del = require('del');
-var print = require('gulp-print');
-var spawn = require('child_process').spawn;
-
-function download(url, dest, cb) {
- console.log('Downloading ' + url + ' to ' + dest);
- var file = fs.createWriteStream(dest);
- var request = http.get(url, function (response) {
- response.pipe(file);
- file.on('finish', function () {
- console.log('Download completed');
- file.close(cb);
- });
- });
-}
-
-function getLatest(cb) {
- var branch = 'develop';
- process.argv.forEach(function (val) {
- var branchMatch = /branch=([\S]*)/.exec(val);
- if (branchMatch && branchMatch.length > 1) {
- branch = branchMatch[1];
- }
- });
-
- var url = 'http://services.sonarr.tv/v1/update/' + branch + '?os=osx';
-
- console.log('Checking for latest version:', url);
-
- http.get(url, function (res) {
- var data = '';
-
- res.on('data', function (chunk) {
- data += chunk;
- });
-
- res.on('end', function () {
- var updatePackage = JSON.parse(data).updatePackage;
- console.log('Latest version available: ' + updatePackage.version + ' Release Date: ' + updatePackage.releaseDate);
- cb(updatePackage);
- });
- }).on('error', function (e) {
- console.log('problem with request: ' + e.message);
- });
-}
-
-function extract(source, dest, cb) {
- console.log('extracting download page to ' + dest);
- new targz().extract(source, dest, function (err) {
- if (err) {
- console.log(err);
- }
- console.log('Update package extracted.');
- cb();
- });
-}
-
-gulp.task('getSonarr', function () {
-
- //gulp.src('/Users/kayone/git/Sonarr/_start/2.0.0.3288/NzbDrone/*.*')
- // .pipe(print())
- // .pipe(gulp.dest('./_output
-
- //return;
- try {
- fs.mkdirSync('./_start/');
- } catch (e) {
- if (e.code != 'EEXIST') {
- throw e;
- }
- }
-
- getLatest(function (package) {
- var packagePath = "./_start/" + package.filename;
- var dirName = "./_start/" + package.version;
- download(package.url, packagePath, function () {
- extract(packagePath, dirName, function () {
- // clean old binaries
- console.log('Cleaning old binaries');
- del.sync(['./_output/*', '!./_output/UI/']);
- console.log('copying binaries to target');
- gulp.src(dirName + '/NzbDrone/*.*')
- .pipe(gulp.dest('./_output/'));
- });
- });
- });
-});
-
-gulp.task('startSonarr', function () {
-
- var ls = spawn('mono', ['--debug', './_output/NzbDrone.exe']);
-
- ls.stdout.on('data', function (data) {
- process.stdout.write('' + data);
- });
-
- ls.stderr.on('data', function (data) {
- process.stdout.write('' + data);
- });
-
- ls.on('close', function (code) {
- console.log('child process exited with code ' + code);
- });
-});
diff --git a/gulp/stripBom.js b/gulp/stripBom.js
deleted file mode 100644
index d10238c3e..000000000
--- a/gulp/stripBom.js
+++ /dev/null
@@ -1,27 +0,0 @@
-var gulp = require('gulp');
-var paths = require('./paths.js');
-var stripbom = require('gulp-stripbom');
-
-var stripBom = function(dest) {
- gulp.src([paths.src.scripts, paths.src.exclude.libs])
- .pipe(stripbom({
- showLog: false
- }))
- .pipe(gulp.dest(dest));
-
- gulp.src(paths.src.less)
- .pipe(stripbom({
- showLog: false
- }))
- .pipe(gulp.dest(dest));
-
- gulp.src(paths.src.templates)
- .pipe(stripbom({
- showLog: false
- }))
- .pipe(gulp.dest(dest));
-};
-
-gulp.task('stripBom', function() {
- stripBom(paths.src.root);
-});
diff --git a/gulp/watch.js b/gulp/watch.js
deleted file mode 100644
index 49a85f2b9..000000000
--- a/gulp/watch.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var gulp = require('gulp');
-var livereload = require('gulp-livereload');
-
-var paths = require('./paths.js');
-
-require('./handlebars.js');
-require('./less.js');
-require('./copy.js');
-require('./webpack.js');
-
-gulp.task('watch', ['handlebars', 'less', 'copyHtml', 'copyContent', 'copyJs'], function () {
- livereload.listen();
- gulp.start('webpackWatch');
- gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['copyJs']);
- gulp.watch(paths.src.templates, ['handlebars']);
- gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);
- gulp.watch([paths.src.html], ['copyHtml']);
- gulp.watch([paths.src.content + '**/*.*', '!**/*.less'], ['copyContent']);
-});
diff --git a/gulp/webpack.js b/gulp/webpack.js
deleted file mode 100644
index 64570593c..000000000
--- a/gulp/webpack.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var gulp = require('gulp');
-var webpackStream = require('webpack-stream');
-var livereload = require('gulp-livereload');
-var webpackConfig = require('../webpack.config');
-
-gulp.task('webpack', function() {
- return gulp.src('main.js').pipe(webpackStream(webpackConfig)).pipe(gulp.dest(''));
-});
-
-gulp.task('webpackWatch', function() {
- webpackConfig.watch = true;
- return gulp.src('main.js').pipe(webpackStream(webpackConfig)).pipe(gulp.dest('')).pipe(livereload());
-});
diff --git a/gulpFile.js b/gulpFile.js
index fea49f151..73636a918 100644
--- a/gulpFile.js
+++ b/gulpFile.js
@@ -1,7 +1 @@
-var phantom = require('./frontend/gulp/helpers/phantom');
-
-if (phantom) {
- require('./frontend/gulp/gulpFile.js');
-} else {
- require('./gulp/gulpFile.js');
-}
+require('./frontend/gulp/gulpFile.js');
diff --git a/src/UI/.idea/.name b/src/UI/.idea/.name
deleted file mode 100644
index 78ec2c0fe..000000000
--- a/src/UI/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-NzbDrone.UI
\ No newline at end of file
diff --git a/src/UI/.idea/NzbDrone.UI.iml b/src/UI/.idea/NzbDrone.UI.iml
deleted file mode 100644
index 2184ad470..000000000
--- a/src/UI/.idea/NzbDrone.UI.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
- Path - | -- Free Space - | -
---|
{{StartTime airDateUtc}} {{#unless_today airDateUtc}}{{ShortDate airDateUtc}}{{/unless_today}}
-- - {{title}} - - {{seasonNumber}}x{{Pad2 episodeNumber}} -
-