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

This commit is contained in:
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 Normal file → Executable file
View File

0
.npmignore Normal file → Executable file
View File

0
.travis.yml Normal file → Executable file
View File

0
CHANGELOG.md Normal file → Executable file
View File

0
CONTRIBUTORS.md Normal file → Executable file
View File

0
Dockerfile Normal file → Executable file
View File

0
Dockerfile.dev Normal file → Executable file
View File

184
Gruntfile.js Normal file → Executable file
View File

@ -1,6 +1,7 @@
module.exports = function (grunt) {
const buildDir = "dist";
const schemaDir = "server/src/lib/configuration/Configuration.schema.json"
var theme = grunt.option('theme') || 'default';
grunt.initConfig({
env: {
@ -14,7 +15,10 @@ module.exports = function (grunt) {
TS_NODE_PROJECT: "server/tsconfig.json"
}
},
clean: ['dist'],
clean: {
dist: ['dist'],
backup: ['backup'],
},
run: {
"compile-server": {
cmd: "./node_modules/.bin/tsc",
@ -83,123 +87,34 @@ module.exports = function (grunt) {
}
},
copy: {
main_resources: {
backup: {
files: [{
expand: true,
cwd: 'themes/main/server/src/resources',
src: ['dist/**'],
dest: 'backup'
}]
},
resources: {
expand: true,
cwd: 'themes/' + theme + '/server/src/resources',
src: '**',
dest: `${buildDir}/server/src/resources/`
},
main_views: {
views: {
expand: true,
cwd: 'themes/main/server/src/views',
cwd: 'themes/' + theme + '/server/src/views',
src: '**',
dest: `${buildDir}/server/src/views/`
},
main_images: {
images: {
expand: true,
cwd: 'themes/main/client/src/img',
cwd: 'themes/' + theme + '/client/src/img',
src: '**',
dest: `${buildDir}/server/src/public_html/img/`
},
main_thirdparties: {
thirdparties: {
expand: true,
cwd: 'themes/main/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',
cwd: 'themes/' + theme + '/client/src/thirdparties',
src: '**',
dest: `${buildDir}/server/src/public_html/js/`
},
@ -270,24 +185,8 @@ module.exports = function (grunt) {
}
},
concat: {
main_css: {
src: ['themes/main/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'],
css: {
src: ['themes/' + theme + '/client/src/css/*.css'],
dest: `${buildDir}/server/src/public_html/css/authelia.css`
},
},
@ -300,8 +199,6 @@ module.exports = function (grunt) {
}
});
var target = grunt.option('target') || 'main';
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
@ -311,7 +208,6 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-run');
grunt.loadNpmTasks('grunt-env');
grunt.registerTask('compile-server', ['run:lint-server', 'run:compile-server'])
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-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-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('copy-resources', ['copy:resources', 'copy:views', 'copy:images', 'copy:thirdparties', 'concat:css']);
grunt.registerTask('generate-config-schema', ['run:generate-config-schema', 'copy:schema']);
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-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-dist', ['clean', 'build', 'run:minify', 'cssmin', 'run:include-minified-script']);
grunt.registerTask('build-server', ['compile-server', 'copy-resources', 'generate-config-schema']);
grunt.registerTask('build', ['build-client', 'build-server']);
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('docker-build', ['run:docker-build']);
grunt.registerTask('default', ['build-dist']);
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', ['check', 'build-dist']);
};

0
LICENSE Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
client/src/css/00-bootstrap.min.css vendored Normal file → Executable file
View File

0
client/src/css/01-main.css Normal file → Executable file
View File

0
client/src/css/02-login.css Normal file → Executable file
View File

0
client/src/css/03-errors.css Normal file → Executable file
View File

0
client/src/css/03-password-reset-form.css Normal file → Executable file
View File

0
client/src/css/03-password-reset-request.css Normal file → Executable file
View File

0
client/src/css/03-totp-register.css Normal file → Executable file
View File

0
client/src/css/03-u2f-register.css Normal file → Executable file
View File

0
client/src/img/background.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 347 B

0
client/src/img/icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
client/src/img/mail.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

0
client/src/img/notifications/error.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 863 B

After

Width:  |  Height:  |  Size: 863 B

0
client/src/img/notifications/info.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 732 B

After

Width:  |  Height:  |  Size: 732 B

0
client/src/img/notifications/success.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 931 B

After

Width:  |  Height:  |  Size: 931 B

0
client/src/img/notifications/warning.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

0
client/src/img/padlock.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

0
client/src/img/password.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

0
client/src/img/pendrive.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

0
client/src/img/stores/applestore-badge.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
client/src/img/stores/googleplay-badge.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

0
client/src/img/success.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
client/src/img/user.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
client/src/img/warning.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

0
client/src/index.ts Normal file → Executable file
View File

0
client/src/lib/GetPromised.ts Normal file → Executable file
View File

0
client/src/lib/INotifier.ts Normal file → Executable file
View File

0
client/src/lib/Notifier.ts Normal file → Executable file
View File

0
client/src/lib/QueryParametersRetriever.ts Normal file → Executable file
View File

0
client/src/lib/SafeRedirect.ts Normal file → Executable file
View File

0
client/src/lib/firstfactor/FirstFactorValidator.ts Normal file → Executable file
View File

0
client/src/lib/firstfactor/UISelectors.ts Normal file → Executable file
View File

0
client/src/lib/firstfactor/index.ts Normal file → Executable file
View File

0
client/src/lib/reset-password/constants.ts Normal file → Executable file
View File

0
client/src/lib/reset-password/reset-password-form.ts Normal file → Executable file
View File

View File

0
client/src/lib/secondfactor/TOTPValidator.ts Normal file → Executable file
View File

0
client/src/lib/secondfactor/U2FValidator.ts Normal file → Executable file
View File

0
client/src/lib/secondfactor/constants.ts Normal file → Executable file
View File

0
client/src/lib/secondfactor/index.ts Normal file → Executable file
View File

0
client/src/lib/totp-register/totp-register.ts Normal file → Executable file
View File

0
client/src/lib/totp-register/ui-selector.ts Normal file → Executable file
View File

0
client/src/lib/u2f-register/u2f-register.ts Normal file → Executable file
View File

0
client/src/thirdparties/qrcode.min.js vendored Normal file → Executable file
View File

0
client/test/Notifier.test.ts Normal file → Executable file
View File

0
client/test/firstfactor/FirstFactorValidator.test.ts Normal file → Executable file
View File

0
client/test/mocks/NotifierStub.ts Normal file → Executable file
View File

0
client/test/mocks/jquery.ts Normal file → Executable file
View File

0
client/test/mocks/u2f-api.ts Normal file → Executable file
View File

0
client/test/secondfactor/TOTPValidator.test.ts Normal file → Executable file
View File

0
client/test/totp-register/totp-register.test.ts Normal file → Executable file
View File

0
client/tsconfig.json Normal file → Executable file
View File

0
client/tslint.json Normal file → Executable file
View File

2
config.minimal.yml Normal file → Executable file
View File

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

0
config.template.yml Normal file → Executable file
View File

0
docker-compose.dev.yml Normal file → Executable file
View File

0
docker-compose.dockerhub.yml Normal file → Executable file
View File

0
docker-compose.minimal.dev.yml Normal file → Executable file
View File

0
docker-compose.minimal.yml Normal file → Executable file
View File

0
docker-compose.swarm.minimal.yml Normal file → Executable file
View File

0
docker-compose.test.yml Normal file → Executable file
View File

0
docker-compose.yml Normal file → Executable file
View File

0
docs/build.md Normal file → Executable file
View File

0
docs/configuration.md Normal file → Executable file
View File

0
docs/deployment-dev.md Normal file → Executable file
View File

0
docs/deployment-production.md Normal file → Executable file
View File

0
docs/features.md Normal file → Executable file
View File

0
docs/getting-started.md Normal file → Executable file
View File

0
docs/security.md Normal file → Executable file
View File

0
example/compose/authelia/docker-compose.test.yml Normal file → Executable file
View File

0
example/compose/docker-compose.base.yml Normal file → Executable file
View File

0
example/compose/httpbin/docker-compose.yml Normal file → Executable file
View File

0
example/compose/ldap/access.rules Normal file → Executable file
View File

0
example/compose/ldap/base.ldif Normal file → Executable file
View File

0
example/compose/ldap/docker-compose.admin.yml Normal file → Executable file
View File

0
example/compose/ldap/docker-compose.yml Normal file → Executable file
View File

0
example/compose/mongo/docker-compose.yml Normal file → Executable file
View File

0
example/compose/nginx/backend/docker-compose.yml Normal file → Executable file
View File

0
example/compose/nginx/backend/html/admin/secret.html Normal file → Executable file
View File

View File

View File

View File

View File

View File

0
example/compose/nginx/backend/html/home/index.html Normal file → Executable file
View File

0
example/compose/nginx/backend/html/icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
example/compose/nginx/backend/html/mail/secret.html Normal file → Executable file
View File

0
example/compose/nginx/backend/html/public/index.html Normal file → Executable file
View File

0
example/compose/nginx/backend/html/public/secret.html Normal file → Executable file
View File

View File

0
example/compose/nginx/backend/nginx.conf Normal file → Executable file
View File

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