From 711c7da197ed170094dc2e96d020757425b674aa Mon Sep 17 00:00:00 2001 From: Vashon Gonzales <104737326+VashonG@users.noreply.github.com> Date: Thu, 20 Jul 2023 10:01:05 +0000 Subject: [PATCH] added Grunt --- Gruntfile.js | 33 +++++++++++++++++++++++++++++++++ package.json | 29 +++++++++++++++++++++++++---- 2 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 Gruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..66a3d5f --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,33 @@ +module.exports = function (grunt) { + // Project configuration + grunt.initConfig({ + // Task configurations + concat: { + options: { + separator: ';', + }, + dist: { + src: ['src/*.js'], + dest: 'dist/bundle.js', + }, + }, + uglify: { + options: { + mangle: false, + }, + dist: { + files: { + 'dist/bundle.min.js': ['dist/bundle.js'], + }, + }, + }, + }); + + // Load Grunt plugins + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + + // Register Grunt tasks + grunt.registerTask('default', ['concat', 'uglify']); + }; + \ No newline at end of file diff --git a/package.json b/package.json index c632074..d125361 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "anima-project", + "name": "carat", "version": "1.0.0", "description": "A React project automatically generated by Anima, the design-to-code platform", "source": "./index.html", @@ -27,9 +27,30 @@ "@storybook/react": "^7.0.3", "@storybook/react-webpack5": "^7.0.3", "@storybook/testing-library": "^0.0.14-next.2", + "grunt": "^1.6.1", + "grunt-contrib-concat": "^2.1.0", + "grunt-contrib-uglify": "^5.2.2", "parcel": "^2.8.0", "parcel-reporter-static-files-copy": "^1.5.0", "process": "^0.11.10", - "storybook": "^7.0.3" - } -} \ No newline at end of file + "storybook": "^7.0.3", + "webpack-cli": "^5.1.4" + }, + "main": "index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/Karat-Card/Carat-Club-Dashboard.git" + }, + "keywords": [ + "carat", + "credit", + "typescript", + "dashboard" + ], + "author": "Vashon Gonzales", + "license": "MIT", + "bugs": { + "url": "https://github.com/Karat-Card/Carat-Club-Dashboard/issues" + }, + "homepage": "https://github.com/Karat-Card/Carat-Club-Dashboard#readme" +}