added all themes, clean and backup of dist, --theme value check

pull/309/head
BankaiNoJutsu 2018-12-18 16:30:23 +01:00
parent 1e71815b00
commit 48c204fc68
1805 changed files with 66 additions and 55701 deletions

0
.gitignore vendored 100644 → 100755
View File

0
.npmignore 100644 → 100755
View File

0
.travis.yml 100644 → 100755
View File

0
CHANGELOG.md 100644 → 100755
View File

0
CONTRIBUTORS.md 100644 → 100755
View File

0
Dockerfile 100644 → 100755
View File

0
Dockerfile.dev 100644 → 100755
View File

186
Gruntfile.js 100644 → 100755
View File

@ -1,7 +1,8 @@
module.exports = function (grunt) { module.exports = function (grunt) {
const buildDir = "dist"; const buildDir = "dist";
const schemaDir = "server/src/lib/configuration/Configuration.schema.json" const schemaDir = "server/src/lib/configuration/Configuration.schema.json"
var theme = grunt.option('theme') || 'default';
grunt.initConfig({ grunt.initConfig({
env: { env: {
"env-test-server-unit": { "env-test-server-unit": {
@ -14,7 +15,10 @@ module.exports = function (grunt) {
TS_NODE_PROJECT: "server/tsconfig.json" TS_NODE_PROJECT: "server/tsconfig.json"
} }
}, },
clean: ['dist'], clean: {
dist: ['dist'],
backup: ['backup'],
},
run: { run: {
"compile-server": { "compile-server": {
cmd: "./node_modules/.bin/tsc", cmd: "./node_modules/.bin/tsc",
@ -83,123 +87,34 @@ module.exports = function (grunt) {
} }
}, },
copy: { copy: {
main_resources: { backup: {
files: [{
expand: true, expand: true,
cwd: 'themes/main/server/src/resources', src: ['dist/**'],
dest: 'backup'
}]
},
resources: {
expand: true,
cwd: 'themes/' + theme + '/server/src/resources',
src: '**', src: '**',
dest: `${buildDir}/server/src/resources/` dest: `${buildDir}/server/src/resources/`
}, },
main_views: { views: {
expand: true, expand: true,
cwd: 'themes/main/server/src/views', cwd: 'themes/' + theme + '/server/src/views',
src: '**', src: '**',
dest: `${buildDir}/server/src/views/` dest: `${buildDir}/server/src/views/`
}, },
main_images: { images: {
expand: true, expand: true,
cwd: 'themes/main/client/src/img', cwd: 'themes/' + theme + '/client/src/img',
src: '**', src: '**',
dest: `${buildDir}/server/src/public_html/img/` dest: `${buildDir}/server/src/public_html/img/`
}, },
main_thirdparties: { thirdparties: {
expand: true, expand: true,
cwd: 'themes/main/client/src/thirdparties', cwd: 'themes/' + theme + '/client/src/thirdparties',
src: '**',
dest: `${buildDir}/server/src/public_html/js/`
},
matrix_resources: {
expand: true,
cwd: 'themes/matrix/server/src/resources',
src: '**',
dest: `${buildDir}/server/src/resources/`
},
matrix_views: {
expand: true,
cwd: 'themes/matrix/server/src/views',
src: '**',
dest: `${buildDir}/server/src/views/`
},
matrix_images: {
expand: true,
cwd: 'themes/matrix/client/src/img',
src: '**',
dest: `${buildDir}/server/src/public_html/img/`
},
matrix_thirdparties: {
expand: true,
cwd: 'themes/matrix/client/src/thirdparties',
src: '**',
dest: `${buildDir}/server/src/public_html/js/`
},
black_resources: {
expand: true,
cwd: 'themes/black/server/src/resources',
src: '**',
dest: `${buildDir}/server/src/resources/`
},
black_views: {
expand: true,
cwd: 'themes/black/server/src/views',
src: '**',
dest: `${buildDir}/server/src/views/`
},
black_images: {
expand: true,
cwd: 'themes/black/client/src/img',
src: '**',
dest: `${buildDir}/server/src/public_html/img/`
},
black_thirdparties: {
expand: true,
cwd: 'themes/black/client/src/thirdparties',
src: '**',
dest: `${buildDir}/server/src/public_html/js/`
},
squares_resources: {
expand: true,
cwd: 'themes/squares/server/src/resources',
src: '**',
dest: `${buildDir}/server/src/resources/`
},
squares_views: {
expand: true,
cwd: 'themes/squares/server/src/views',
src: '**',
dest: `${buildDir}/server/src/views/`
},
squares_images: {
expand: true,
cwd: 'themes/squares/client/src/img',
src: '**',
dest: `${buildDir}/server/src/public_html/img/`
},
squares_thirdparties: {
expand: true,
cwd: 'themes/squares/client/src/thirdparties',
src: '**',
dest: `${buildDir}/server/src/public_html/js/`
},
triangles_resources: {
expand: true,
cwd: 'themes/triangles/server/src/resources',
src: '**',
dest: `${buildDir}/server/src/resources/`
},
triangles_views: {
expand: true,
cwd: 'themes/triangles/server/src/views',
src: '**',
dest: `${buildDir}/server/src/views/`
},
triangles_images: {
expand: true,
cwd: 'themes/triangles/client/src/img',
src: '**',
dest: `${buildDir}/server/src/public_html/img/`
},
triangles_thirdparties: {
expand: true,
cwd: 'themes/triangles/client/src/thirdparties',
src: '**', src: '**',
dest: `${buildDir}/server/src/public_html/js/` dest: `${buildDir}/server/src/public_html/js/`
}, },
@ -270,24 +185,8 @@ module.exports = function (grunt) {
} }
}, },
concat: { concat: {
main_css: { css: {
src: ['themes/main/client/src/css/*.css'], src: ['themes/' + theme + '/client/src/css/*.css'],
dest: `${buildDir}/server/src/public_html/css/authelia.css`
},
matrix_css: {
src: ['themes/matrix/client/src/css/*.css'],
dest: `${buildDir}/server/src/public_html/css/authelia.css`
},
black_css: {
src: ['themes/black/client/src/css/*.css'],
dest: `${buildDir}/server/src/public_html/css/authelia.css`
},
squares_css: {
src: ['themes/squares/client/src/css/*.css'],
dest: `${buildDir}/server/src/public_html/css/authelia.css`
},
triangles_css: {
src: ['themes/triangles/client/src/css/*.css'],
dest: `${buildDir}/server/src/public_html/css/authelia.css` dest: `${buildDir}/server/src/public_html/css/authelia.css`
}, },
}, },
@ -299,8 +198,6 @@ module.exports = function (grunt) {
} }
} }
}); });
var target = grunt.option('target') || 'main';
grunt.loadNpmTasks('grunt-browserify'); grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-concat');
@ -311,7 +208,6 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-run'); grunt.loadNpmTasks('grunt-run');
grunt.loadNpmTasks('grunt-env'); grunt.loadNpmTasks('grunt-env');
grunt.registerTask('compile-server', ['run:lint-server', 'run:compile-server']) grunt.registerTask('compile-server', ['run:lint-server', 'run:compile-server'])
grunt.registerTask('compile-client', ['run:lint-client', 'run:compile-client']) grunt.registerTask('compile-client', ['run:lint-client', 'run:compile-client'])
@ -321,31 +217,33 @@ module.exports = function (grunt) {
grunt.registerTask('test-unit', ['test-server', 'test-client', 'test-shared']); grunt.registerTask('test-unit', ['test-server', 'test-client', 'test-shared']);
grunt.registerTask('test-int', ['run:test-cucumber', 'run:test-minimal-config', 'run:test-complete-config', 'run:test-inactivity']); grunt.registerTask('test-int', ['run:test-cucumber', 'run:test-minimal-config', 'run:test-complete-config', 'run:test-inactivity']);
grunt.registerTask('copy-resources-main', ['copy:main_resources', 'copy:main_views', 'copy:main_images', 'copy:main_thirdparties', 'concat:main_css']); grunt.registerTask('copy-resources', ['copy:resources', 'copy:views', 'copy:images', 'copy:thirdparties', 'concat:css']);
grunt.registerTask('copy-resources-matrix', ['copy:matrix_resources', 'copy:matrix_views', 'copy:matrix_images', 'copy:matrix_thirdparties', 'concat:matrix_css']);
grunt.registerTask('copy-resources-black', ['copy:black_resources', 'copy:black_views', 'copy:black_images', 'copy:black_thirdparties', 'concat:black_css']);
grunt.registerTask('copy-resources-squares', ['copy:squares_resources', 'copy:squares_views', 'copy:squares_images', 'copy:squares_thirdparties', 'concat:squares_css']);
grunt.registerTask('copy-resources-triangles', ['copy:triangles_resources', 'copy:triangles_views', 'copy:triangles_images', 'copy:triangles_thirdparties', 'concat:triangles_css']);
grunt.registerTask('generate-config-schema', ['run:generate-config-schema', 'copy:schema']); grunt.registerTask('generate-config-schema', ['run:generate-config-schema', 'copy:schema']);
grunt.registerTask('build-client', ['compile-client', 'browserify']); grunt.registerTask('build-client', ['compile-client', 'browserify']);
grunt.registerTask('build-server-main', ['compile-server', 'copy-resources-main', 'generate-config-schema']);
grunt.registerTask('build-server-matrix', ['compile-server', 'copy-resources-matrix', 'generate-config-schema']); grunt.registerTask('build-server', ['compile-server', 'copy-resources', 'generate-config-schema']);
grunt.registerTask('build-server-black', ['compile-server', 'copy-resources-black', 'generate-config-schema']);
grunt.registerTask('build-server-squares', ['compile-server', 'copy-resources-squares', 'generate-config-schema']);
grunt.registerTask('build-server-triangles', ['compile-server', 'copy-resources-triangles', 'generate-config-schema']);
grunt.registerTask('build', ['build-client', 'build-server-'+target]); grunt.registerTask('build', ['build-client', 'build-server']);
grunt.registerTask('build-dist', ['clean', 'build', 'run:minify', 'cssmin', 'run:include-minified-script']); grunt.registerTask('build-dist', ['clean:backup', 'copy:backup', 'clean:dist', 'build', 'run:minify', 'cssmin', 'run:include-minified-script']);
grunt.registerTask('schema', ['run:generate-config-schema']) grunt.registerTask('schema', ['run:generate-config-schema'])
grunt.registerTask('docker-build', ['run:docker-build']); grunt.registerTask('docker-build', ['run:docker-build']);
grunt.registerTask('check', function() {
if (grunt.option('theme') == 'undefined') {
grunt.log.writeln('1- Valid argmuents are just "grunt" (will use default) or "grunt --theme=|default|black|matrix|squares|triangles"');
}
if ((theme != 'default') && (theme != 'black') && (theme != 'matrix') && (theme != 'squares') && (theme != 'triangles')) {
grunt.warn('2- Valid argmuents are just "grunt" (will use default) or "grunt --theme=|default|black|matrix|squares|triangles"');
}
if (grunt.option('theme') == 'default' || 'black' || 'matrix' || 'squares' || 'triangles') {
grunt.log.ok();
grunt.log.writeln('Building "'+ theme +'" theme');
}
});
grunt.registerTask('default', ['build-dist']); grunt.registerTask('default', ['check', 'build-dist']);
}; };

0
LICENSE 100644 → 100755
View File

0
README.md 100644 → 100755
View File

0
client/src/css/00-bootstrap.min.css vendored 100644 → 100755
View File

0
client/src/css/01-main.css 100644 → 100755
View File

0
client/src/css/02-login.css 100644 → 100755
View File

0
client/src/css/03-errors.css 100644 → 100755
View File

View File

View File

View File

View File

0
client/src/img/background.svg 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 347 B

0
client/src/img/icon.png 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
client/src/img/mail.png 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 863 B

After

Width:  |  Height:  |  Size: 863 B

View File

Before

Width:  |  Height:  |  Size: 732 B

After

Width:  |  Height:  |  Size: 732 B

View File

Before

Width:  |  Height:  |  Size: 931 B

After

Width:  |  Height:  |  Size: 931 B

View File

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

0
client/src/img/padlock.png 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

0
client/src/img/password.png 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

0
client/src/img/pendrive.png 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

0
client/src/img/success.png 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
client/src/img/user.png 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
client/src/img/warning.png 100644 → 100755
View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

0
client/src/index.ts 100644 → 100755
View File

0
client/src/lib/GetPromised.ts 100644 → 100755
View File

0
client/src/lib/INotifier.ts 100644 → 100755
View File

0
client/src/lib/Notifier.ts 100644 → 100755
View File

View File

0
client/src/lib/SafeRedirect.ts 100644 → 100755
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
client/src/thirdparties/qrcode.min.js vendored 100644 → 100755
View File

0
client/test/Notifier.test.ts 100644 → 100755
View File

0
client/test/mocks/NotifierStub.ts 100644 → 100755
View File

0
client/test/mocks/jquery.ts 100644 → 100755
View File

0
client/test/mocks/u2f-api.ts 100644 → 100755
View File

View File

View File

0
client/tsconfig.json 100644 → 100755
View File

0
client/tslint.json 100644 → 100755
View File

2
config.minimal.yml 100644 → 100755
View File

@ -4,7 +4,7 @@
authentication_backend: authentication_backend:
file: file:
path: /etc/authelia/users_database.yml path: users_database.yml
session: session:
secret: unsecure_session_secret secret: unsecure_session_secret

0
config.template.yml 100644 → 100755
View File

0
docker-compose.dev.yml 100644 → 100755
View File

0
docker-compose.dockerhub.yml 100644 → 100755
View File

0
docker-compose.minimal.dev.yml 100644 → 100755
View File

0
docker-compose.minimal.yml 100644 → 100755
View File

0
docker-compose.swarm.minimal.yml 100644 → 100755
View File

0
docker-compose.test.yml 100644 → 100755
View File

0
docker-compose.yml 100644 → 100755
View File

0
docs/build.md 100644 → 100755
View File

0
docs/configuration.md 100644 → 100755
View File

0
docs/deployment-dev.md 100644 → 100755
View File

0
docs/deployment-production.md 100644 → 100755
View File

0
docs/features.md 100644 → 100755
View File

0
docs/getting-started.md 100644 → 100755
View File

0
docs/security.md 100644 → 100755
View File

View File

View File

View File

0
example/compose/ldap/access.rules 100644 → 100755
View File

0
example/compose/ldap/base.ldif 100644 → 100755
View File

View File

View File

View File

View File

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Some files were not shown because too many files have changed in this diff Show More