From 371bba1ee8379c1ee263a72c3e1c52d88902e44b Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 3 Mar 2014 12:11:23 +0200 Subject: [PATCH] grunt --- .gitignore | 2 ++ Gruntfile.js | 34 ++++++++++++++++++++++++++++++++++ package.json | 15 +++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 119a60bfac..4a3a59a7ca 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ application/Espo/Resources/layouts/CustomTest/* application/Espo/Modules/Crm/Resources/layouts/CustomTest/* application/Espo/Resources/metadata/customTest/* application/Espo/Modules/Crm/Resources/metadata/customTest/* +build +node_modules diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000000..4181f11038 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,34 @@ +module.exports = function (grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + clean: { + build: ['build/*'], + }, + copy: { + build: { + expand: true, + src: [ + 'api/**', + 'application/**', + 'data', + 'vendor/**', + 'bootstrap.php', + 'cron.php', + 'index.php', + 'LICENSE.txt', + '.htaccess', + ], + dest: 'build/', + }, + }, + }); + + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-copy'); + + grunt.registerTask('default', [ + 'clean', + 'copy', + ]); +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000000..d88a86f3ac --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "espo-backend", + "version": "0.1.0", + "description": "", + "main": "index.php", + "repository": "", + "author": "", + "license": "GPL", + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-copy": "~0.4.1", + "grunt-contrib-clean": "~0.5.0", + "grunt-replace": "~0.5.1" + } +}