2017-05-13 23:12:26 +07:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
grunt.initConfig({
|
|
|
|
run: {
|
|
|
|
options: {},
|
|
|
|
"build-ts": {
|
|
|
|
cmd: "npm",
|
|
|
|
args: ['run', 'build-ts']
|
|
|
|
},
|
|
|
|
"tslint": {
|
|
|
|
cmd: "npm",
|
|
|
|
args: ['run', 'tslint']
|
|
|
|
},
|
|
|
|
"test": {
|
|
|
|
cmd: "npm",
|
|
|
|
args: ['run', 'test']
|
2017-05-13 23:32:25 +07:00
|
|
|
},
|
|
|
|
"docker-build": {
|
|
|
|
cmd: "docker",
|
|
|
|
args: ['build', '-t', 'clems4ever/authelia', '.']
|
2017-05-13 23:12:26 +07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
copy: {
|
|
|
|
resources: {
|
|
|
|
expand: true,
|
|
|
|
cwd: 'src/resources/',
|
|
|
|
src: '**',
|
|
|
|
dest: 'dist/src/resources/'
|
|
|
|
},
|
|
|
|
views: {
|
|
|
|
expand: true,
|
|
|
|
cwd: 'src/views/',
|
|
|
|
src: '**',
|
|
|
|
dest: 'dist/src/views/'
|
|
|
|
},
|
|
|
|
public_html: {
|
|
|
|
expand: true,
|
|
|
|
cwd: 'src/public_html/',
|
|
|
|
src: '**',
|
|
|
|
dest: 'dist/src/public_html/'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-run');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
|
|
|
|
|
|
|
grunt.registerTask('default', ['build']);
|
|
|
|
|
|
|
|
grunt.registerTask('res', ['copy:resources', 'copy:views', 'copy:public_html']);
|
2017-05-13 23:32:25 +07:00
|
|
|
|
2017-05-13 23:12:26 +07:00
|
|
|
grunt.registerTask('build', ['run:tslint', 'run:build-ts', 'res']);
|
2017-05-13 23:32:25 +07:00
|
|
|
grunt.registerTask('docker-build', ['run:docker-build']);
|
2017-05-13 23:12:26 +07:00
|
|
|
|
|
|
|
grunt.registerTask('test', ['run:test']);
|
|
|
|
};
|