diff --git a/.bowerrc b/.bowerrc index f7a7a56..8f98a03 100644 --- a/.bowerrc +++ b/.bowerrc @@ -1,3 +1,3 @@ { - "directory": "chrome_point_plus/vendor" + "directory": "vendor" } diff --git a/.gitignore b/.gitignore index cf32de9..13dc734 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ chrome_point_plus/vendor/ /nbproject/private/ node_modules/ publish +vendor/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..4f02a0c --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,41 @@ +var vendorCopy = [ + 'jquery/jquery.min.js', + + 'fancybox/source/jquery.fancybox.pack.js', + 'fancybox/source/helpers/jquery.fancybox-media.js', + 'fancybox/source/jquery.fancybox.css', + + 'markitup/markitup/jquery.markitup.js', + 'markitup/markitup/skins/markitup/style.css' +].map(function(file) { + return { + src: 'vendor/' + file, + dest: 'chrome_point_plus/vendor/' + file + }; +}); + +vendorCopy.push({ + expand: true, + src: [ 'vendor/fancybox/source/*.png' ], + dest: 'chrome_point_plus/' +}); + +module.exports = function(grunt) { + + // Настройки + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + // Что копировать + copy: { + main: { + files: vendorCopy + } + } + }); + + // Загрузить плагины + grunt.loadNpmTasks('grunt-contrib-copy'); + + // Что выполнять по команде `grunt` + grunt.registerTask('default', [ 'copy' ]); +}; diff --git a/package.json b/package.json index 5253a15..ab2250c 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,8 @@ "author": "\"Alexey Skobkin\"", "license": "MIT", "devDependencies": { - "bower": "^1.3.12" + "bower": "^1.3.12", + "grunt": "^0.4.5", + "grunt-contrib-copy": "^0.7.0" } }