From c7af79da4be732fd4325884d2c9356c763814e20 Mon Sep 17 00:00:00 2001 From: dasha Date: Sun, 9 Apr 2023 15:32:06 +0400 Subject: [PATCH] commit front 1 --- front/.gitignore | 50 +++++++++++++++++++++++++++++++++++++++++++ front/build.gradle | 53 ++++++++++++++++++++++++++++++++++++++++++++++ front/package.json | 46 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 front/.gitignore create mode 100644 front/build.gradle create mode 100644 front/package.json diff --git a/front/.gitignore b/front/.gitignore new file mode 100644 index 0000000..5eb675a --- /dev/null +++ b/front/.gitignore @@ -0,0 +1,50 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +.parcel-cache diff --git a/front/build.gradle b/front/build.gradle new file mode 100644 index 0000000..c2fe13c --- /dev/null +++ b/front/build.gradle @@ -0,0 +1,53 @@ +import com.github.gradle.node.util.PlatformHelper +import groovy.text.SimpleTemplateEngine + +plugins { + id 'java' + id 'com.github.node-gradle.node' version '3.5.1' + id "de.undercouch.download" version '5.3.1' +} + +node { + version = '18.15.0' + download = true +} + +jar.dependsOn 'npmBuild' + +clean.dependsOn 'npmClean' + +nodeSetup.dependsOn 'downloadNode' + +jar { + from 'dist' + into 'static' +} + +task downloadNode(type: Download) { + final helper = new PlatformHelper() + final templateData = [ + "url" : node.distBaseUrl.get(), + "version": node.version.get(), + "os" : helper.osName, + "arch" : helper.osArch, + "ext" : helper.windows ? 'zip' : 'tar.gz' + ] + final urlTemplate = '${url}/v${version}/node-v${version}-${os}-${arch}.${ext}' + final engine = new SimpleTemplateEngine() + final url = engine.createTemplate(urlTemplate).make(templateData).toString() + final String destDir = '.gradle/' + file(destDir).mkdirs() + src url + dest destDir + overwrite false +} + +tasks.register('npmBuild', NpmTask) { + dependsOn npmInstall + args = ['run-script', 'build'] +} + +tasks.register('npmClean', NpmTask) { + dependsOn npmInstall + args = ['run-script', 'clean'] +} \ No newline at end of file diff --git a/front/package.json b/front/package.json new file mode 100644 index 0000000..7139740 --- /dev/null +++ b/front/package.json @@ -0,0 +1,46 @@ +{ + "name": "cinema-react-2", + "version": "0.1.0", + "source": "./public/index.html", + "private": true, + "dependencies": { + "@fortawesome/fontawesome-free": "^6.2.1", + "@fortawesome/free-solid-svg-icons": "^6.2.1", + "@fortawesome/react-fontawesome": "^0.2.0", + "axios": "^1.2.1", + "bootstrap": "^5.2.3", + "font-awesome": "^4.7.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-router-dom": "^6.4.4" + }, + "scripts": { + "start": "parcel --port 3000", + "build": "npm run clean && parcel build", + "clean": "rimraf dist" + }, + "devDependencies": { + "buffer": "^5.7.1", + "parcel": "2.8.3", + "process": "^0.11.10", + "rimraf": "4.4.0" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +}