1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-21 23:42:23 +00:00

New: Tooling changes for UI

This commit is contained in:
Qstick 2018-11-23 02:05:47 -05:00
parent 8430cb40ab
commit ac0d1c92c3
39 changed files with 8129 additions and 10650 deletions

View file

@ -115,7 +115,7 @@ jobs:
zip -r ../_packages/Radarr.${CIRCLE_BRANCH//\//-}.$BUILD_VERSION.$CIRCLE_BUILD_NUM.osx-app.zip * zip -r ../_packages/Radarr.${CIRCLE_BRANCH//\//-}.$BUILD_VERSION.$CIRCLE_BUILD_NUM.osx-app.zip *
- run: - run:
name: "Creating Installer" name: "Creating Installer"
command: wine setup/inno/ISCC.exe setup/nzbdrone.iss && cp -r setup/Output/Radarr* _packages/ command: wine setup/inno/ISCC.exe setup/radarr.iss && cp -r setup/Output/Radarr* _packages/
- store_artifacts: - store_artifacts:
path: _packages path: _packages
destination: artifacts destination: artifacts

9
.esprintrc Normal file
View file

@ -0,0 +1,9 @@
{
"paths": [
"frontend/src/**/*.js"
],
"ignored": [
"**/node_modules/**/*"
],
"port": 5004
}

2
.gitignore vendored
View file

@ -125,8 +125,6 @@ _tests/
setup/Output/ setup/Output/
*.~is *.~is
UI.Phantom/
# VS outout folders # VS outout folders
bin bin
obj obj

1
.npmrc Normal file
View file

@ -0,0 +1 @@
save-prefix=""

1
.yarnrc Normal file
View file

@ -0,0 +1 @@
save-prefix ""

View file

@ -11,9 +11,9 @@ var outputFolderOsxApp = outputFolderOsx + "_app";
var testPackageFolder = "./_tests"; var testPackageFolder = "./_tests";
var testSearchPattern = "*.Test/bin/x86/Release"; var testSearchPattern = "*.Test/bin/x86/Release";
var sourceFolder = "./src"; var sourceFolder = "./src";
var solutionFile = sourceFolder + "/NzbDrone.sln"; var solutionFile = sourceFolder + "/Radarr.sln";
var updateFolder = outputFolder + "/NzbDrone.Update"; var updateFolder = outputFolder + "/Radarr.Update";
var updateFolderMono = outputFolderMono + "/NzbDrone.Update"; var updateFolderMono = outputFolderMono + "/Radarr.Update";
// Artifact variables // Artifact variables
var artifactsFolder = "./_artifacts"; var artifactsFolder = "./_artifacts";
@ -136,8 +136,8 @@ Task("PackageMono").Does(() => {
DeleteFiles(outputFolderMono + "/sqlite3.*"); DeleteFiles(outputFolderMono + "/sqlite3.*");
DeleteFiles(outputFolderMono + "/MediaInfo.*"); DeleteFiles(outputFolderMono + "/MediaInfo.*");
// Adding NzbDrone.Core.dll.config (for dllmap) // Adding Radarr.Core.dll.config (for dllmap)
CopyFile(sourceFolder + "/NzbDrone.Core/NzbDrone.Core.dll.config", outputFolderMono + "/NzbDrone.Core.dll.config"); CopyFile(sourceFolder + "/NzbDrone.Core/Radarr.Core.dll.config", outputFolderMono + "/Radarr.Core.dll.config");
// Adding CurlSharp.dll.config (for dllmap) // Adding CurlSharp.dll.config (for dllmap)
CopyFile(sourceFolder + "/NzbDrone.Common/CurlSharp.dll.config", outputFolderMono + "/CurlSharp.dll.config"); CopyFile(sourceFolder + "/NzbDrone.Common/CurlSharp.dll.config", outputFolderMono + "/CurlSharp.dll.config");
@ -148,11 +148,11 @@ Task("PackageMono").Does(() => {
MoveFile(outputFolderMono + "/Radarr.Console.exe.config", outputFolderMono + "/Radarr.exe.config"); MoveFile(outputFolderMono + "/Radarr.Console.exe.config", outputFolderMono + "/Radarr.exe.config");
MoveFile(outputFolderMono + "/Radarr.Console.exe.mdb", outputFolderMono + "/Radarr.exe.mdb"); MoveFile(outputFolderMono + "/Radarr.Console.exe.mdb", outputFolderMono + "/Radarr.exe.mdb");
// Remove NzbDrone.Windows.* // Remove Radarr.Windows.*
DeleteFiles(outputFolderMono + "/NzbDrone.Windows.*"); DeleteFiles(outputFolderMono + "/Radarr.Windows.*");
// Adding NzbDrone.Mono to updatePackage // Adding Radarr.Mono to updatePackage
CopyFiles(outputFolderMono + "/NzbDrone.Mono.*", updateFolderMono); CopyFiles(outputFolderMono + "/Radarr.Mono.*", updateFolderMono);
}); });
Task("PackageOsx").Does(() => { Task("PackageOsx").Does(() => {
@ -236,8 +236,8 @@ Task("PackageTests").Does(() => {
// Clean // Clean
CleanFolder(testPackageFolder, true); CleanFolder(testPackageFolder, true);
// Adding NzbDrone.Core.dll.config (for dllmap) // Adding Radarr.Core.dll.config (for dllmap)
CopyFile(sourceFolder + "/NzbDrone.Core/NzbDrone.Core.dll.config", testPackageFolder + "/NzbDrone.Core.dll.config"); CopyFile(sourceFolder + "/NzbDrone.Core/Radarr.Core.dll.config", testPackageFolder + "/Radarr.Core.dll.config");
// Adding CurlSharp.dll.config (for dllmap) // Adding CurlSharp.dll.config (for dllmap)
CopyFile(sourceFolder + "/NzbDrone.Common/CurlSharp.dll.config", testPackageFolder + "/CurlSharp.dll.config"); CopyFile(sourceFolder + "/NzbDrone.Common/CurlSharp.dll.config", testPackageFolder + "/CurlSharp.dll.config");
@ -248,10 +248,10 @@ Task("PackageTests").Does(() => {
Task("CleanupWindowsPackage").Does(() => { Task("CleanupWindowsPackage").Does(() => {
// Remove mono // Remove mono
DeleteFiles(outputFolder + "/NzbDrone.Mono.*"); DeleteFiles(outputFolder + "/Radarr.Mono.*");
// Adding NzbDrone.Windows to updatePackage // Adding NzbDrone.Windows to updatePackage
CopyFiles(outputFolder + "/NzbDrone.Windows.*", updateFolder); CopyFiles(outputFolder + "/Radarr.Windows.*", updateFolder);
}); });
Task("Build") Task("Build")
@ -277,7 +277,7 @@ Task("ArtifactsWindows").Does(() => {
}); });
Task("ArtifactsWindowsInstaller").Does(() => { Task("ArtifactsWindowsInstaller").Does(() => {
InnoSetup("./setup/nzbdrone.iss", new InnoSetupSettings { InnoSetup("./setup/radarr.iss", new InnoSetupSettings {
OutputDirectory = artifactsFolder, OutputDirectory = artifactsFolder,
ToolPath = "./setup/inno/ISCC.exe" ToolPath = "./setup/inno/ISCC.exe"
}); });

View file

@ -7,9 +7,9 @@ outputFolderOsxApp='./_output_osx_app'
testPackageFolder='./_tests/' testPackageFolder='./_tests/'
testSearchPattern='*.Test/bin/x86/Release' testSearchPattern='*.Test/bin/x86/Release'
sourceFolder='./src' sourceFolder='./src'
slnFile=$sourceFolder/NzbDrone.sln slnFile=$sourceFolder/Radarr.sln
updateFolder=$outputFolder/NzbDrone.Update updateFolder=$outputFolder/Radarr.Update
updateFolderMono=$outputFolderMono/NzbDrone.Update updateFolderMono=$outputFolderMono/Radarr.Update
nuget='tools/nuget/nuget.exe'; nuget='tools/nuget/nuget.exe';
CheckExitCode() CheckExitCode()
@ -88,9 +88,20 @@ BuildWithXbuild()
CheckExitCode msbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb /maxcpucount:3 $slnFile CheckExitCode msbuild /p:Configuration=Release /p:Platform=x86 /t:Build /p:AllowedReferenceRelatedFileExtensions=.pdb /maxcpucount:3 $slnFile
} }
LintUI()
{
echo "ESLint"
CheckExitCode yarn eslint
echo "ESLint"
echo "Stylelint"
CheckExitCode yarn stylelint
echo "Stylelint"
}
Build() Build()
{ {
echo "##teamcity[progressStart 'Build']" echo "Start Build"
rm -rf $outputFolder rm -rf $outputFolder
@ -109,18 +120,20 @@ Build()
echo "Removing Mono.Posix.dll" echo "Removing Mono.Posix.dll"
rm $outputFolder/Mono.Posix.dll rm $outputFolder/Mono.Posix.dll
echo "##teamcity[progressFinish 'Build']" echo "Finish Build"
} }
RunGulp() RunGulp()
{ {
echo "##teamcity[progressStart 'npm install']" echo "Start yarn install"
npm-cache install npm || CheckExitCode npm install yarn install
echo "##teamcity[progressFinish 'npm install']" echo "Finish yarn install"
echo "##teamcity[progressStart 'Running gulp']" LintUI
CheckExitCode npm run build
echo "##teamcity[progressFinish 'Running gulp']" echo "Start Running gulp"
CheckExitCode yarn run build --production
echo "Finish Running gulp"
} }
CreateMdbs() CreateMdbs()
@ -161,22 +174,22 @@ PackageMono()
rm -f $outputFolderMono/MediaInfo.* rm -f $outputFolderMono/MediaInfo.*
echo "Adding NzbDrone.Core.dll.config (for dllmap)" echo "Adding NzbDrone.Core.dll.config (for dllmap)"
cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $outputFolderMono cp $sourceFolder/NzbDrone.Core/Radarr.Core.dll.config $outputFolderMono
echo "Adding CurlSharp.dll.config (for dllmap)" echo "Adding CurlSharp.dll.config (for dllmap)"
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderMono cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderMono
echo "Renaming NzbDrone.Console.exe to NzbDrone.exe" echo "Renaming Radarr.Console.exe to Radarr.exe"
rm $outputFolderMono/Radarr.exe* rm $outputFolderMono/Radarr.exe*
for file in $outputFolderMono/Radarr.Console.exe*; do for file in $outputFolderMono/Radarr.Console.exe*; do
mv "$file" "${file//.Console/}" mv "$file" "${file//.Console/}"
done done
echo "Removing NzbDrone.Windows" echo "Removing Radarr.Windows"
rm $outputFolderMono/NzbDrone.Windows.* rm $outputFolderMono/Radarr.Windows.*
echo "Adding NzbDrone.Mono to UpdatePackage" echo "Adding Radarr.Mono to UpdatePackage"
cp $outputFolderMono/NzbDrone.Mono.* $updateFolderMono cp $outputFolderMono/Radarr.Mono.* $updateFolderMono
echo "##teamcity[progressFinish 'Creating Mono Package']" echo "##teamcity[progressFinish 'Creating Mono Package']"
} }
@ -236,8 +249,8 @@ PackageTests()
CleanFolder $testPackageFolder true CleanFolder $testPackageFolder true
echo "Adding NzbDrone.Core.dll.config (for dllmap)" echo "Adding Radarr.Core.dll.config (for dllmap)"
cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $testPackageFolder cp $sourceFolder/NzbDrone.Core/Radarr.Core.dll.config $testPackageFolder
echo "Adding CurlSharp.dll.config (for dllmap)" echo "Adding CurlSharp.dll.config (for dllmap)"
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $testPackageFolder cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $testPackageFolder
@ -250,11 +263,11 @@ PackageTests()
CleanupWindowsPackage() CleanupWindowsPackage()
{ {
echo "Removing NzbDrone.Mono" echo "Removing Radarr.Mono"
rm -f $outputFolder/NzbDrone.Mono.* rm -f $outputFolder/Radarr.Mono.*
echo "Adding NzbDrone.Windows to UpdatePackage" echo "Adding Radarr.Windows to UpdatePackage"
cp $outputFolder/NzbDrone.Windows.* $updateFolder cp $outputFolder/Radarr.Windows.* $updateFolder
} }
# Use mono or .net depending on OS # Use mono or .net depending on OS
@ -262,7 +275,7 @@ case "$(uname -s)" in
CYGWIN*|MINGW32*|MINGW64*|MSYS*) CYGWIN*|MINGW32*|MINGW64*|MSYS*)
# on windows, use dotnet # on windows, use dotnet
runtime="dotnet" runtime="dotnet"
vsLoc=$(./vswhere.exe -property installationPath) vsLoc=$(./tools/vswhere/vswhere.exe -property installationPath)
vsLoc=$(echo "/$vsLoc" | sed -e 's/\\/\//g' -e 's/://') vsLoc=$(echo "/$vsLoc" | sed -e 's/\\/\//g' -e 's/://')
msBuild="$vsLoc$msBuild" msBuild="$vsLoc$msBuild"
;; ;;

View file

@ -209,7 +209,6 @@
"lines-around-comment": ["error", { "beforeBlockComment": true, "afterBlockComment": false }], "lines-around-comment": ["error", { "beforeBlockComment": true, "afterBlockComment": false }],
"max-depth": ["error", {"maximum": 5}], "max-depth": ["error", {"maximum": 5}],
"max-nested-callbacks": ["error", 4], "max-nested-callbacks": ["error", 4],
"max-params": ["error", 6],
"max-statements": "off", "max-statements": "off",
"max-statements-per-line": ["error", { "max": 1 }], "max-statements-per-line": ["error", { "max": 1 }],
"new-cap": ["error", {"capIsNewExceptions": ["$.Deferred", "DragDropContext", "DragLayer", "DragSource", "DropTarget"]}], "new-cap": ["error", {"capIsNewExceptions": ["$.Deferred", "DragDropContext", "DragLayer", "DragSource", "DropTarget"]}],

View file

@ -24,7 +24,7 @@
"ignoreAtRules": [ "ignoreAtRules": [
"/^add\\-mixin$/", "/^add\\-mixin$/",
"/^define\\-mixin$/" "/^define\\-mixin$/"
] ]
} }
], ],
"at-rule-no-vendor-prefix": true, "at-rule-no-vendor-prefix": true,

View file

@ -14,6 +14,7 @@ module.exports = (ctx, configPath, options) => {
return Object.assign(acc, reload(vars)); return Object.assign(acc, reload(vars));
}, {}) }, {})
}, },
'postcss-color-function': {},
'postcss-nested': {}, 'postcss-nested': {},
autoprefixer: { autoprefixer: {
browsers: [ browsers: [

View file

@ -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'
]);
});

View file

@ -1,8 +0,0 @@
var gulp = require('gulp');
var del = require('del');
var paths = require('./paths');
gulp.task('clean', function(cb) {
del([paths.dest.root], cb);
});

View file

@ -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());
});

View file

@ -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');
}
};

View file

@ -1,11 +0,0 @@
require('./watch.js');
require('./build.js');
require('./clean.js');
require('./jshint.js');
require('./handlebars.js');
require('./copy.js');
require('./less.js');
require('./stripBom.js');
require('./imageMin.js');
require('./webpack.js');
require('./start.js');

View file

@ -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());
});

View file

@ -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/'));
});

View file

@ -1,15 +0,0 @@
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var cache = require('gulp-cached');
var paths = require('./paths.js');
gulp.task('jshint', function() {
return gulp.src([
paths.src.scripts,
paths.src.exclude.libs
])
.pipe(cache('jshint'))
.pipe(jshint())
.pipe(jshint.reporter(stylish));
});

View file

@ -1,54 +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-core');
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 + 'AddMovies/addMovies.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',
paths.src.root + 'Movies/movies.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());
});

View file

@ -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;

View file

@ -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);
});
});

View file

@ -1,21 +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);
});

View file

@ -1,20 +0,0 @@
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var paths = require('./paths.js');
require('./jshint.js');
require('./handlebars.js');
require('./less.js');
require('./copy.js');
require('./webpack.js');
gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyHtml', 'copyContent', 'copyJs'], function () {
livereload.listen();
gulp.start('webpackWatch');
gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint', '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']);
});

View file

@ -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());
});

View file

@ -1 +1 @@
require('./gulp/gulpFile.js'); require('./frontend/gulp/gulpFile.js');

View file

@ -31,8 +31,8 @@ fi
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$HOME/lib:/usr/local/lib:/lib:/usr/lib" export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$HOME/lib:/usr/local/lib:/lib:/usr/lib"
#mono version check #mono version check
REQUIRED_MAJOR=3 REQUIRED_MAJOR=4
REQUIRED_MINOR=10 REQUIRED_MINOR=6
VERSION_TITLE="Cannot launch $APPNAME" VERSION_TITLE="Cannot launch $APPNAME"
VERSION_MSG="$APPNAME requires Mono Runtime Environment(MRE) $REQUIRED_MAJOR.$REQUIRED_MINOR or later." VERSION_MSG="$APPNAME requires Mono Runtime Environment(MRE) $REQUIRED_MAJOR.$REQUIRED_MINOR or later."

View file

@ -23,11 +23,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.0</string> <string>1.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>xmmd</string> <string>xmmd</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>2.0</string> <string>1.0</string>
<key>NSAppleScriptEnabled</key> <key>NSAppleScriptEnabled</key>
<string>YES</string> <string>YES</string>
</dict> </dict>

10154
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,50 +1,115 @@
{ {
"name": "Radarr", "name": "radarr",
"version": "2.0.0", "version": "1.0.0",
"description": "Radarr", "description": "Radarr is a PVR for Usenet and BitTorrent users",
"main": "main.js",
"scripts": { "scripts": {
"build": "gulp build", "build": "gulp build",
"start": "gulp watch" "start": "gulp watch",
"eslint": "esprint check",
"eslint-fix": "eslint start --fix",
"stylelint": "stylelint frontend/**/*.css --config frontend/.stylelintrc"
}, },
"repository": { "repository": "https://github.com/Radarr/Radarr",
"type": "git", "author": "Team Radarr",
"url": "git://github.com/Radarr/Radarr.git"
},
"author": "",
"license": "GPL-3.0", "license": "GPL-3.0",
"gitHead": "9ff7aa1bf7fe38c4c5bdb92f56c8ad556916ed67",
"readmeFilename": "readme.md", "readmeFilename": "readme.md",
"dependencies": { "dependencies": {
"autoprefixer-core": "5.2.1", "@fortawesome/fontawesome-free": "5.3.1",
"del": "1.2.0", "@fortawesome/fontawesome-svg-core": "1.2.4",
"gulp": "3.9.0", "@fortawesome/free-regular-svg-icons": "5.3.1",
"gulp-cached": "1.1.0", "@fortawesome/free-solid-svg-icons": "5.3.1",
"gulp-clean-css": "^3.0.4", "@fortawesome/react-fontawesome": "0.1.3",
"gulp-concat": "2.6.0", "@sentry/browser": "4.0.3",
"autoprefixer": "9.1.5",
"babel-core": "6.26.3",
"babel-eslint": "9.0.0",
"babel-loader": "7.1.2",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-preset-decorators-legacy": "1.0.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"classnames": "2.2.6",
"clipboard": "2.0.1",
"create-react-class": "15.6.3",
"css-loader": "0.28.9",
"del": "3.0.0",
"element-class": "0.2.2",
"esformatter": "0.10.0",
"eslint": "5.6.0",
"eslint-plugin-filenames": "1.3.2",
"eslint-plugin-react": "7.11.1",
"esprint": "0.4.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.6",
"filesize": "3.6.1",
"gulp": "3.9.1",
"gulp-cached": "1.1.1",
"gulp-clean-css": "3.10.0",
"gulp-concat": "2.6.1",
"gulp-declare": "0.3.0", "gulp-declare": "0.3.0",
"gulp-handlebars": "3.0.1", "gulp-livereload": "4.0.0",
"gulp-jshint": "1.11.2", "gulp-postcss": "8.0.0",
"gulp-less": "3.0.3", "gulp-print": "5.0.0",
"gulp-livereload": "3.8.0", "gulp-sourcemaps": "2.6.4",
"gulp-postcss": "6.0.0",
"gulp-print": "1.1.0",
"gulp-replace": "0.5.3",
"gulp-run": "1.6.8",
"gulp-sourcemaps": "1.5.2",
"gulp-stripbom": "1.0.4", "gulp-stripbom": "1.0.4",
"gulp-webpack": "1.5.0", "gulp-util": "3.0.8",
"gulp-wrap": "0.11.0", "gulp-watch": "5.0.1",
"handlebars": "3.0.3", "gulp-wrap": "0.14.0",
"jshint-loader": "0.8.3", "history": "4.7.2",
"jshint-stylish": "2.0.1", "jdu": "1.0.0",
"npm": "^6.0.1", "jquery": "3.3.1",
"run-sequence": "1.1.1", "loader-utils": "^1.1.0",
"streamqueue": "1.1.0", "lodash": "4.17.11",
"tar.gz": "0.1.1", "mobile-detect": "1.4.3",
"url-search-params": "^0.6.1", "moment": "2.22.2",
"webpack": "1.12.0", "mousetrap": "1.6.2",
"webpack-stream": "2.1.0", "normalize.css": "8.0.1",
"natives": "^1.1.3" "postcss-color-function": "4.0.1",
} "postcss-loader": "3.0.0",
"postcss-mixins": "6.2.0",
"postcss-nested": "4.1.0",
"postcss-simple-vars": "5.0.1",
"prop-types": "15.6.2",
"qs": "6.5.2",
"react": "16.6.3",
"react-addons-shallow-compare": "15.6.2",
"react-async-script": "1.0.0",
"react-autosuggest": "9.4.2",
"react-custom-scrollbars": "4.2.1",
"react-dnd": "5.0.0",
"react-dnd-html5-backend": "5.0.1",
"react-document-title": "2.0.3",
"react-dom": "16.6.3",
"react-google-recaptcha": "1.0.2",
"react-lazyload": "2.3.0",
"react-measure": "1.4.7",
"react-redux": "5.1.1",
"react-router-dom": "4.3.1",
"react-router-redux": "5.0.0-alpha.6",
"react-slider": "0.11.2",
"react-tabs": "2.3.0",
"react-tether": "1.0.1",
"react-text-truncate": "0.13.1",
"react-virtualized": "9.20.1",
"redux": "4.0.1",
"redux-actions": "2.6.4",
"redux-batched-actions": "0.4.0",
"redux-localstorage": "0.4.1",
"redux-thunk": "2.3.0",
"require-nocache": "1.0.0",
"reselect": "3.0.1",
"run-sequence": "2.2.1",
"signalr": "2.4.0",
"streamqueue": "1.1.2",
"style-loader": "0.19.1",
"stylelint": "9.5.0",
"stylelint-order": "1.0.0",
"tar.gz": "1.0.7",
"uglifyjs-webpack-plugin": "1.2.5",
"url-loader": "0.6.2",
"webpack": "3.10.0",
"webpack-stream": "^4.0.0"
},
"main": "index.js"
} }

View file

@ -38,10 +38,10 @@ chmod +x $outputFolderOsxApp/Radarr.app/Contents/MacOS/Radarr2
mv $outputFolderOsxApp/Radarr.app/Contents/MacOS/Radarr2 $outputFolderOsxApp/Radarr.app/Contents/MacOS/Radarr >& error.log mv $outputFolderOsxApp/Radarr.app/Contents/MacOS/Radarr2 $outputFolderOsxApp/Radarr.app/Contents/MacOS/Radarr >& error.log
if [ $runtime = "dotnet" ] ; then if [ $runtime = "dotnet" ] ; then
./7za.exe a Radarr_Windows_$VERSION.zip ./Radarr_Windows_$VERSION/* ./tools/7zip/7za.exe a Radarr_Windows_$VERSION.zip ./Radarr_Windows_$VERSION/*
./7za.exe a -ttar -so Radarr_Mono_$VERSION.tar ./Radarr_Mono_$VERSION/* | ./7za.exe a -si Radarr_Mono_$VERSION.tar.gz ./tools/7zip/7za.exe a -ttar -so Radarr_Mono_$VERSION.tar ./Radarr_Mono_$VERSION/* | ./tools/7zip/7za.exe a -si Radarr_Mono_$VERSION.tar.gz
./7za.exe a -ttar -so Radarr_OSX_$VERSION.tar ./_output_osx/* | ./7za.exe a -si Radarr_OSX_$VERSION.tar.gz ./tools/7zip/7za.exe a -ttar -so Radarr_OSX_$VERSION.tar ./_output_osx/* | ./tools/7zip/7za.exe a -si Radarr_OSX_$VERSION.tar.gz
./7za.exe a -ttar -so Radarr_OSX_App_$VERSION.tar ./_output_osx_app/* | ./7za.exe a -si Radarr_OSX_App_$VERSION.tar.gz ./tools/7zip/7za.exe a -ttar -so Radarr_OSX_App_$VERSION.tar ./_output_osx_app/* | ./tools/7zip/7za.exe a -si Radarr_OSX_App_$VERSION.tar.gz
else else
cp -r $outputFolder/ Radarr cp -r $outputFolder/ Radarr
zip -r Radarr.$BRANCH.$VERSION.windows.zip Radarr zip -r Radarr.$BRANCH.$VERSION.windows.zip Radarr

View file

@ -1,3 +1,3 @@
#SET BUILD_NUMBER=1 #SET BUILD_NUMBER=1
#SET branch=develop #SET branch=develop
inno\ISCC.exe nzbdrone.iss inno\ISCC.exe radarr.iss

View file

@ -6,7 +6,7 @@
#define AppURL "https://radarr.video/" #define AppURL "https://radarr.video/"
#define ForumsURL "https://github.com/Radarr/Radarr/issues" #define ForumsURL "https://github.com/Radarr/Radarr/issues"
#define AppExeName "Radarr.exe" #define AppExeName "Radarr.exe"
#define BuildNumber "2.0" #define BuildNumber "1.0"
#define BuildVersion GetEnv('APPVEYOR_BUILD_VERSION') #define BuildVersion GetEnv('APPVEYOR_BUILD_VERSION')
#define BranchName StringChange(GetEnv('APPVEYOR_REPO_BRANCH'), "/", "-") #define BranchName StringChange(GetEnv('APPVEYOR_REPO_BRANCH'), "/", "-")

View file

@ -1,5 +1,4 @@
var path = require('path'); var path = require('path');
var stylish = require('jshint-stylish');
var webpack = require('webpack'); var webpack = require('webpack');
var uglifyJsPlugin = new webpack.optimize.UglifyJsPlugin(); var uglifyJsPlugin = new webpack.optimize.UglifyJsPlugin();

7948
yarn.lock Normal file

File diff suppressed because it is too large Load diff