Commit b6885b94 authored by Ilya Rassadin's avatar Ilya Rassadin
Browse files

Make JS_RESOURCES_ROOT a direct reference for the linted files

JS_RESOURCES_ROOT is the path argument passed to ESLint — it has no
meaning in .build_js (npm run does not take a path) or .deploy_js_files_to_server.
Remove it from .build_js variables and from the build override example.
Also broaden the lint path from $JS_RESOURCES_ROOT/js/** to $JS_RESOURCES_ROOT/**
so projects without a js/ subfolder can use the template.
parent f902080d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@
.build_js:
  stage: build
  variables:
    JS_RESOURCES_ROOT: resources
    JS_BUILD_OUTPUT: new/build
    JS_NPM_SCRIPT: prod
  script:
+0 −1
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ include:
# build_js:
#   extends: .build_js
#   variables:
#     JS_RESOURCES_ROOT: resources-terminal
#     JS_BUILD_OUTPUT: terminal/build
#     JS_NPM_SCRIPT: prod-terminal
#   dependencies:
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
    JS_NPM_SCRIPT: lint
  stage: test
  script:
    - cd $CI_PROJECT_DIR && npm install && npm run $JS_NPM_SCRIPT $JS_RESOURCES_ROOT/js/**
    - cd $CI_PROJECT_DIR && npm install && npm run $JS_NPM_SCRIPT $JS_RESOURCES_ROOT/**
  rules:
    - if: $CI_COMMIT_REF_PROTECTED == 'true' || $CI_PIPELINE_SOURCE == "merge_request_event"
      changes: