Skip to content

Commit

Permalink
Merge pull request #6 from jellyfin/master
Browse files Browse the repository at this point in the history
Updating to master
  • Loading branch information
BaronGreenback committed Nov 22, 2020
2 parents 4dc5354 + 26fb54c commit 22733f7
Show file tree
Hide file tree
Showing 308 changed files with 7,911 additions and 6,678 deletions.
12 changes: 3 additions & 9 deletions .ci/azure-pipelines-build.yml
Expand Up @@ -8,8 +8,6 @@ jobs:
BuildConfiguration: development
Production:
BuildConfiguration: production
Standalone:
BuildConfiguration: standalone

pool:
vmImage: 'ubuntu-latest'
Expand All @@ -21,15 +19,15 @@ jobs:
versionSpec: '12.x'

- task: Cache@2
displayName: 'Check Cache'
displayName: 'Cache node_modules'
inputs:
key: 'yarn | yarn.lock'
path: 'node_modules'
cacheHitVar: CACHE_RESTORED

- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
condition: ne(variables.CACHE_RESTORED, 'true')
env:
SKIP_PREPARE: 'true'

- script: 'yarn build:development'
displayName: 'Build Development'
Expand All @@ -39,10 +37,6 @@ jobs:
displayName: 'Build Production'
condition: eq(variables['BuildConfiguration'], 'production')

- script: 'yarn build:standalone'
displayName: 'Build Standalone'
condition: eq(variables['BuildConfiguration'], 'standalone')

- script: 'test -d dist'
displayName: 'Check Build'

Expand Down
6 changes: 3 additions & 3 deletions .ci/azure-pipelines-lint.yml
Expand Up @@ -12,15 +12,15 @@ jobs:
versionSpec: '12.x'

- task: Cache@2
displayName: 'Check Cache'
displayName: 'Cache node_modules'
inputs:
key: 'yarn | yarn.lock'
path: 'node_modules'
cacheHitVar: CACHE_RESTORED

- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
condition: ne(variables.CACHE_RESTORED, 'true')
env:
SKIP_PREPARE: 'true'

- script: 'yarn run lint --quiet'
displayName: 'Run ESLint'
Expand Down
7 changes: 0 additions & 7 deletions .eslintrc.js
Expand Up @@ -25,7 +25,6 @@ module.exports = {
'eslint:recommended',
// 'plugin:promise/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:eslint-comments/recommended',
'plugin:compat/recommended'
],
Expand Down Expand Up @@ -79,16 +78,12 @@ module.exports = {
// Dependency globals
'$': 'readonly',
'jQuery': 'readonly',
'requirejs': 'readonly',
// Jellyfin globals
'ApiClient': 'writable',
'AppInfo': 'writable',
'chrome': 'writable',
'DlnaProfilePage': 'writable',
'Dashboard': 'writable',
'DashboardPage': 'writable',
'Emby': 'readonly',
'Events': 'writable',
'getParameterByName': 'writable',
'getWindowLocationSearch': 'writable',
'Globalize': 'writable',
Expand All @@ -98,8 +93,6 @@ module.exports = {
'LinkParser': 'writable',
'LiveTvHelpers': 'writable',
'MetadataEditor': 'writable',
'pageClassOn': 'writable',
'pageIdOn': 'writable',
'PlaylistViewer': 'writable',
'UserParentalControlPage': 'writable',
'Windows': 'readonly'
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/codeql-analysis.yml
@@ -0,0 +1,31 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '30 7 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
queries: +security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Expand Up @@ -41,6 +41,7 @@
- [Cromefire_](https://github.com/cromefire)
- [Orry Verducci](https://github.com/orryverducci)
- [Camc314](https://github.com/camc314)
- [danieladov](https://github.com/danieladov)

# Emby Contributors

Expand Down
10 changes: 2 additions & 8 deletions README.md
Expand Up @@ -44,7 +44,7 @@ Jellyfin Web is the frontend used for most of the clients available for end user

### Dependencies

- [Node.js](https://nodejs.org/en/download/)
- [Node.js](https://nodejs.org/en/download)
- [Yarn 1.22.4](https://classic.yarnpkg.com/en/docs/install)
- Gulp-cli

Expand All @@ -69,14 +69,8 @@ Jellyfin Web is the frontend used for most of the clients available for end user
yarn serve
```

4. Build the client with sourcemaps.
4. Build the client with sourcemaps available.

```sh
yarn build:development
```

You can build a nginx compatible version as well.

```sh
yarn build:standalone
```
32 changes: 3 additions & 29 deletions gulpfile.js
Expand Up @@ -2,7 +2,6 @@ const { src, dest, series, parallel, watch } = require('gulp');
const browserSync = require('browser-sync').create();
const del = require('del');
const babel = require('gulp-babel');
const concat = require('gulp-concat');
const terser = require('gulp-terser');
const htmlmin = require('gulp-htmlmin');
const imagemin = require('gulp-imagemin');
Expand All @@ -16,7 +15,6 @@ const stream = require('webpack-stream');
const inject = require('gulp-inject');
const postcss = require('gulp-postcss');
const sass = require('gulp-sass');
const gulpif = require('gulp-if');
const lazypipe = require('lazypipe');

sass.compiler = require('node-sass');
Expand All @@ -30,10 +28,7 @@ if (mode.production()) {

const options = {
javascript: {
query: ['src/**/*.js', '!src/bundle.js', '!src/standalone.js', '!src/scripts/apploader.js']
},
apploader: {
query: ['src/standalone.js', 'src/scripts/apploader.js']
query: ['src/**/*.js', '!src/bundle.js']
},
css: {
query: ['src/**/*.css', 'src/**/*.scss']
Expand Down Expand Up @@ -68,8 +63,6 @@ function serve() {
}
});

watch(options.apploader.query, apploader(true));

watch('src/bundle.js', webpack);

watch(options.css.query).on('all', function (event, path) {
Expand Down Expand Up @@ -131,20 +124,6 @@ function javascript(query) {
.pipe(browserSync.stream());
}

function apploader(standalone) {
function task() {
return src(options.apploader.query, { base: './src/' })
.pipe(gulpif(standalone, concat('scripts/apploader.js')))
.pipe(pipelineJavascript())
.pipe(dest('dist/'))
.pipe(browserSync.stream());
}

task.displayName = 'apploader';

return task;
}

function webpack() {
return stream(config)
.pipe(dest('dist/'))
Expand Down Expand Up @@ -195,10 +174,5 @@ function injectBundle() {
.pipe(browserSync.stream());
}

function build(standalone) {
return series(clean, parallel(javascript, apploader(standalone), webpack, css, html, images, copy));
}

exports.default = series(build(false), injectBundle);
exports.standalone = series(build(true), injectBundle);
exports.serve = series(exports.standalone, serve);
exports.default = series(clean, parallel(javascript, webpack, css, html, images, copy), injectBundle);
exports.serve = series(exports.default, serve);

0 comments on commit 22733f7

Please sign in to comment.