diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3a6b65d5..b023c09c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,6 @@ jobs: - name: Install dependencies run: npm ci - - name: Copy Webpack config - run: cp ./webpack/.env-example ./webpack/.env - - name: Build assets run: npm run build @@ -96,4 +93,4 @@ jobs: upload_url: ${{ steps.release_info.outputs.upload_url }} asset_path: ./${{ github.event.repository.name }}/${{ github.event.repository.name }}.zip asset_name: ${{ github.event.repository.name }}.zip - asset_content_type: application/zip \ No newline at end of file + asset_content_type: application/zip diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b822c2abb..f800b0d0c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,4 +26,4 @@ jobs: node-version: 16 - name: Lint js - run: touch ./webpack/.env && npm ci && npm run lint + run: npm ci && npm run lint diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 57ed2ea80..8b622c3cc 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -13,4 +13,4 @@ jobs: node-version: 16 - name: Build and check types - run: touch ./webpack/.env && npm ci && npm run build + run: npm ci && npm run build diff --git a/.gitignore b/.gitignore index 34c4f5f31..269bca3ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ node_modules assets -.env coverage diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dbc1871a1..423e14a0d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,8 +26,6 @@ First you need to install every node module: `npm ci` -then create a `.env` file inside the *webpack* folder by copying `webpack/.env-example` and complete it with your environment's informations. Please use a free tcp port. - then build assets: `npm run build` diff --git a/README.md b/README.md index f0b020492..735b7cbd9 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,6 @@ First you need to install every node module: `npm ci` -then create a `.env` file inside the *webpack* folder by copying `webpack/.env-example` and complete it with your environment's informations. Please use a free tcp port. - then build assets: `npm run build` diff --git a/webpack/.env-example b/webpack/.env-example deleted file mode 100644 index 33f3c5134..000000000 --- a/webpack/.env-example +++ /dev/null @@ -1,4 +0,0 @@ -PORT=3505 -SERVER_ADDRESS=domain.local -SITE_URL=http://domain.local -PUBLIC_PATH=/themes/hummingbird/assets/ diff --git a/webpack/.env-no-vhost-example b/webpack/.env-no-vhost-example deleted file mode 100644 index 8bbe6cad6..000000000 --- a/webpack/.env-no-vhost-example +++ /dev/null @@ -1,4 +0,0 @@ -PORT=3506 -SERVER_ADDRESS=localhost -SITE_URL=http://localhost:3506/ -PUBLIC_PATH=/ps-new-theme/themes/hummingbird/assets/ diff --git a/webpack/webpack.vars.js b/webpack/webpack.vars.js index ebd350768..f8809ebca 100644 --- a/webpack/webpack.vars.js +++ b/webpack/webpack.vars.js @@ -1,19 +1,10 @@ const fs = require('fs'); const path = require('path'); - +const publicPath = '/themes/hummingbird/assets/'; const themeDev = path.resolve(__dirname, '../src'); -const envFilePath = './webpack/.env'; - -if (fs.existsSync(envFilePath)) { - require('dotenv').config({path: envFilePath}); -} else { - console.error('\x1b[41m\x1b[37m%s\x1b[0m', 'Your .env file not exits. Read getting started section in documentation for more information https://github.com/PrestaShop/hummingbird?tab=readme-ov-file#how-to-build-assets/.'); - process.exit(); -} const { PORT: port, - PUBLIC_PATH: publicPath, SERVER_ADDRESS: serverAddress, SITE_URL: siteURL, } = process.env;