Skip to content

Commit

Permalink
Fix: Path Run
Browse files Browse the repository at this point in the history
  • Loading branch information
edelciomolina committed Dec 6, 2023
1 parent 799d292 commit 08004b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 10 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,29 @@ runs:
with:
node-version: 18

- name: πŸ”° Clone This Action
- name: πŸ”° Running Path
shell: bash
working-directory: bundler-minifier-action
run: |
echo "πŸ’  You are here: $(pwd)";
- name: πŸ”° Cloning This Action
uses: actions/checkout@master
with:
repository: edelciomolina/bundler-minifier-action
path: bundler-minifier-action

- name: πŸ”° NPM Install Dependencies
- name: πŸ”° Installing Dependencies
shell: bash
working-directory: bundler-minifier-action
run: |
echo "πŸ’  You are here: $(pwd)";
npm install;
- name: πŸ”° Run Bundler Minifier Action
- name: πŸ”° Running Bundler Minifier
shell: bash
working-directory: bundler-minifier-action
run: |
echo "πŸ’  You are here: $(pwd)";
node index.js \
--working-directory "${{ inputs.working_directory }}" \
node ./bundler-minifier-action/index.js \
--bundle-config-folder "${{ inputs.bundle_config_folder }}" \
--create-bundle-config "${{ inputs.create_bundle_config }}" \
--search-extensions "${{ inputs.search_extensions }}" \
Expand Down
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ const minify = require('./lib/minify.js')
const clean = require('./lib/clean.js')

const args = process.argv.slice(2)
const workingDirectory = args[args.indexOf('--working-directory') + 1]
const bundleConfigFolder = args[args.indexOf('--bundle-config-folder') + 1]
const createBundleConfig = args[args.indexOf('--create-bundle-config') + 1]
const searchExtensions = args[args.indexOf('--search-extensions') + 1]
const deleteInputFiles = args[args.indexOf('--delete-input-files') + 1]

const working_directory = workingDirectory || './'
const bundle_config_folder = bundleConfigFolder || './test'
const search_extensions = ('.' + (searchExtensions || 'js|css|html').split('|').join(',.')).split(',')
const delete_input_files = (deleteInputFiles || 'true') === 'true'
Expand Down

0 comments on commit 08004b1

Please sign in to comment.