Merge pull request #1950 from normanjaeckel/Worker.js
Simplified installing of JS and CSS libs. Fixed #1906.
This commit is contained in:
commit
25a7f59b70
@ -11,8 +11,6 @@ python:
|
|||||||
install:
|
install:
|
||||||
- "pip install --upgrade --requirement requirements.txt"
|
- "pip install --upgrade --requirement requirements.txt"
|
||||||
- "npm install"
|
- "npm install"
|
||||||
- "node_modules/.bin/bower install"
|
|
||||||
- "node_modules/.bin/gulp --production"
|
|
||||||
script:
|
script:
|
||||||
- "flake8 openslides tests"
|
- "flake8 openslides tests"
|
||||||
- "isort --check-only --recursive openslides tests"
|
- "isort --check-only --recursive openslides tests"
|
||||||
|
15
README.rst
15
README.rst
@ -186,30 +186,29 @@ Installation and start of the development version
|
|||||||
|
|
||||||
$ pip install -r requirements.txt
|
$ pip install -r requirements.txt
|
||||||
|
|
||||||
5. Install all npm and bower packages
|
5. Install all npm and bower packages and concat and copy all third party
|
||||||
|
JavaScript and Cascading Style Sheets libraries
|
||||||
|
|
||||||
For Unix and Mac OS X run::
|
For Unix and Mac OS X run::
|
||||||
|
|
||||||
$ npm install
|
$ npm install
|
||||||
$ node_modules/.bin/bower install
|
|
||||||
|
|
||||||
For Windows run::
|
For Windows run::
|
||||||
|
|
||||||
> npm install
|
> npm install
|
||||||
> node_modules\.bin\bower install
|
|
||||||
|
|
||||||
6. Concat and copy all third party JavaScript and Cascading Style Sheets
|
Later you might want to rerun gulp so that the third party JavaScript
|
||||||
libraries
|
and Cascading Style Sheets libraries are not minified.
|
||||||
|
|
||||||
For Unix and Mac OS X run::
|
To do this for Unix and Mac OS X run::
|
||||||
|
|
||||||
$ node_modules/.bin/gulp
|
$ node_modules/.bin/gulp
|
||||||
|
|
||||||
For Windows run::
|
To do this for Windows run::
|
||||||
|
|
||||||
> node_modules\.bin\gulp
|
> node_modules\.bin\gulp
|
||||||
|
|
||||||
7. Start OpenSlides
|
6. Start OpenSlides
|
||||||
|
|
||||||
Use the command-line interface::
|
Use the command-line interface::
|
||||||
|
|
||||||
|
@ -33,6 +33,11 @@
|
|||||||
"roboto-condensed": "~0.3.0",
|
"roboto-condensed": "~0.3.0",
|
||||||
"open-sans-fontface": "https://github.com/OpenSlides/open-sans.git#1.4.2.post1"
|
"open-sans-fontface": "https://github.com/OpenSlides/open-sans.git#1.4.2.post1"
|
||||||
},
|
},
|
||||||
|
"overrides": {
|
||||||
|
"pdfjs-dist": {
|
||||||
|
"main": "build/pdf.combined.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"angular": ">=1.4.9 <1.5"
|
"angular": ">=1.4.9 <1.5"
|
||||||
}
|
}
|
||||||
|
10
gulpfile.js
10
gulpfile.js
@ -25,7 +25,6 @@ var argv = require('yargs').argv,
|
|||||||
jshint = require('gulp-jshint'),
|
jshint = require('gulp-jshint'),
|
||||||
mainBowerFiles = require('main-bower-files'),
|
mainBowerFiles = require('main-bower-files'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
rename = require('gulp-rename'),
|
|
||||||
through = require('through2'),
|
through = require('through2'),
|
||||||
uglify = require('gulp-uglify'),
|
uglify = require('gulp-uglify'),
|
||||||
vsprintf = require('sprintf-js').vsprintf;
|
vsprintf = require('sprintf-js').vsprintf;
|
||||||
@ -74,13 +73,6 @@ gulp.task('ckeditor', function () {
|
|||||||
.pipe(gulp.dest(path.join(output_directory, 'ckeditor')));
|
.pipe(gulp.dest(path.join(output_directory, 'ckeditor')));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Extra task only for PDF.js
|
|
||||||
gulp.task('pdfjs', function () {
|
|
||||||
return gulp.src(path.join('bower_components', 'pdfjs-dist', 'build', 'pdf.worker.js'))
|
|
||||||
.pipe(rename(path.join('openslides-libs.worker.js')))
|
|
||||||
.pipe(gulp.dest(path.join(output_directory, 'js')));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Compiles translation files (*.po) to *.json and saves them in the directory
|
// Compiles translation files (*.po) to *.json and saves them in the directory
|
||||||
// openslides/static/i18n/.
|
// openslides/static/i18n/.
|
||||||
gulp.task('translations', function () {
|
gulp.task('translations', function () {
|
||||||
@ -92,7 +84,7 @@ gulp.task('translations', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Gulp default task. Runs all other tasks before.
|
// Gulp default task. Runs all other tasks before.
|
||||||
gulp.task('default', ['js-libs', 'css-libs', 'fonts-libs', 'ckeditor', 'pdfjs', 'translations'], function () {});
|
gulp.task('default', ['js-libs', 'css-libs', 'fonts-libs', 'ckeditor', 'translations'], function () {});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<link rel="stylesheet" href="static/css/projector.css">
|
<link rel="stylesheet" href="static/css/projector.css">
|
||||||
<link rel="icon" href="/static/img/favicon.png">
|
<link rel="icon" href="/static/img/favicon.png">
|
||||||
<script src="static/js/openslides-libs.js"></script>
|
<script src="static/js/openslides-libs.js"></script>
|
||||||
<script src="static/js/openslides-libs.worker.js"></script>
|
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#header, #footer {
|
#header, #footer {
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "OpenSlides",
|
"name": "OpenSlides",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"prepublish": "bower install && gulp --production"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bower": "~1.7.2",
|
"bower": "~1.7.2",
|
||||||
"es6-promise": "~3.0.2",
|
"es6-promise": "~3.0.2",
|
||||||
@ -10,7 +13,6 @@
|
|||||||
"gulp-cssnano": "~2.1.0",
|
"gulp-cssnano": "~2.1.0",
|
||||||
"gulp-if": "~2.0.0",
|
"gulp-if": "~2.0.0",
|
||||||
"gulp-jshint": "~2.0.0",
|
"gulp-jshint": "~2.0.0",
|
||||||
"gulp-rename": "~1.2.2",
|
|
||||||
"gulp-uglify": "~1.5.1",
|
"gulp-uglify": "~1.5.1",
|
||||||
"main-bower-files": "~2.11.1",
|
"main-bower-files": "~2.11.1",
|
||||||
"po2json": "~0.4.1",
|
"po2json": "~0.4.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user