Chore: Fix npm building (#658)
This commit is contained in:
parent
e06f08cb5e
commit
48e20c19d1
|
@ -21,12 +21,6 @@ jobs:
|
|||
with:
|
||||
node-version: '16.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build app.js
|
||||
run: npm run build:ci
|
||||
|
||||
- name: Build and Check Package
|
||||
uses: hynek/build-and-inspect-python-package@v1
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ on:
|
|||
- master
|
||||
|
||||
schedule:
|
||||
- cron: '1 0 * * *' # Run daily at 0:01 UTC
|
||||
- cron: '0 14 * * *' # Run daily at 14:00 UTC
|
||||
|
||||
pull_request:
|
||||
|
||||
|
@ -46,12 +46,6 @@ jobs:
|
|||
with:
|
||||
node-version: '16.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build app.js
|
||||
run: npm run build:ci
|
||||
|
||||
- name: Build and Check Package
|
||||
uses: hynek/build-and-inspect-python-package@v1
|
||||
|
||||
|
@ -129,12 +123,6 @@ jobs:
|
|||
with:
|
||||
node-version: '16.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build app
|
||||
run: npm run build:ci
|
||||
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
|
@ -203,12 +191,6 @@ jobs:
|
|||
with:
|
||||
node-version: '16.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build app
|
||||
run: npm run build:ci
|
||||
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"scripts": {
|
||||
"unit": "nyc mocha testing/**/unittest.js",
|
||||
"build:ci": "npm run build:css && npm run build:jsapp",
|
||||
"build": "npm run build:css && npm run build:jsapp",
|
||||
"build:css": "sass --no-source-map --no-error-css src/layout/css/style.scss src/pytest_html/resources/style.css",
|
||||
"build:jsapp": "browserify ./src/pytest_html/scripts/index.js > ./src/pytest_html/resources/app.js",
|
||||
"build": "npm run unit && npm run build:css && npm run build:jsapp",
|
||||
"lint": "eslint src/pytest_html/scripts/ testing/"
|
||||
"lint": "eslint src/pytest_html/scripts/ testing/",
|
||||
"unit": "nyc mocha testing/**/unittest.js",
|
||||
"all": "npm run lint && npm run unit && npm run build:css && npm run build:jsapp"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^17.0.0",
|
||||
|
|
|
@ -5,5 +5,5 @@ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|||
|
||||
class NpmBuildHook(BuildHookInterface):
|
||||
def initialize(self, version, build_data):
|
||||
subprocess.check_output("npm install", shell=True)
|
||||
subprocess.check_output("npm ci", shell=True)
|
||||
subprocess.check_output("npm run build", shell=True)
|
||||
|
|
Loading…
Reference in New Issue