Skip to content

Commit cd79126

Browse files
committed
Get highlight.js from node instead of composer
1 parent 4c9c17f commit cd79126

4 files changed

Lines changed: 21 additions & 32 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,18 @@ jobs:
3636
npm clean-install
3737
npm audit fix
3838
39-
# Store the version, stripping any v-prefix
40-
- name: Write release version
39+
- name: Build custom (minimum) release of highlight.js
4140
run: |
42-
TAG="${{ github.ref_name }}"
43-
echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
44-
45-
- name: Setup PHP, with composer and extensions
46-
id: setup-php
47-
# https://github.com/shivammathur/setup-php
48-
uses: shivammathur/setup-php@v2
49-
with:
50-
# Should match the minimum required version for SimpleSAMLphp
51-
php-version: '8.5'
52-
tools: composer:v2
53-
coverage: none
54-
55-
- name: Validate composer.json and composer.lock
56-
run: composer validate
57-
58-
- name: Install Composer dependencies
59-
run: composer install --no-progress --no-dev --prefer-dist --optimize-autoloader
41+
cd node_modules/highlight.js
42+
npm install --package-lock-only
43+
npm clean-install
44+
npm audit fix
45+
npm run build
46+
node tools/build.js xml properties http
6047
6148
- name: Copy third-party dependencies to lib/ directory
6249
run: |
63-
cp vendor/fredericpetit/highlightjs-composer/assets/js/highlight.min.js lib/highlight.min.js
50+
cp node_modules/highlight.js/build/highlight.min.js lib/highlight.min.js
6451
cp node_modules/pako/dist/pako_inflate.min.js lib/pako_inflate.min.js
6552
6653
- name: Clean release

composer.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

package-lock.json

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"test": "jest"
77
},
88
"dependencies": {
9+
"highlight.js": "github:highlightjs/highlight.js",
910
"pako": "~2.2"
1011
},
1112
"devDependencies": {

0 commit comments

Comments
 (0)