Skip to content

Commit

Permalink
Merge pull request #4 from kaakaa/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
kaakaa authored Oct 6, 2024
2 parents fca1ef9 + 96e3ee9 commit 39ff924
Show file tree
Hide file tree
Showing 9 changed files with 7,178 additions and 8,244 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: "npm"
- run: npm ci
- name: Export slidev as PDF
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-index-page.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
path: gh-pages
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: "npm"
- name: Create index page
run: |
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
15,388 changes: 7,161 additions & 8,227 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "slidev-resources-template",
"private": true,
"type": "module",
"scripts": {
"new": "scaffdog generate new_slide",
"build:before": "node scripts/setup-spa.js ${npm_config_slide} ${npm_config_pagesurl}",
"build:after": "node scripts/create-preview-image.js dist/${npm_config_slide}.pdf docs/${npm_config_slide}/preview.png ",
"build:before": "tsx scripts/setup-spa.ts ${npm_config_slide} ${npm_config_pagesurl}",
"build:after": "tsx scripts/create-preview-image.ts dist/${npm_config_slide}.pdf docs/${npm_config_slide}/preview.png ",
"build": "slidev build --out ../docs/${npm_config_slide} --base /slidev-resources/${npm_config_slide} ${npm_config_slide}/slides.md",
"dev": "slidev --open --remote 0.0.0.0",
"export": "slidev export --output dist/${npm_config_slide}.pdf --format pdf ${npm_config_slide}/slides.md",
"export:dark": "slidev export --dark --output dist/${npm_config_slide}-dark.pdf --format pdf ${npm_config_slide}/slides.md",
"update-index-page": "ts-node scripts/update-index-pages.ts ${npm_config_pagesdir}",
"setup-repository": "ts-node scripts/setup-repository.ts ${npm_config_repository} ${npm_config_pages_basepath} ${npm_config_pages_baseurl}"
"update-index-page": "tsx scripts/update-index-pages.ts ${npm_config_pagesdir}"
},
"dependencies": {
"@iconify-json/logos": "^1.1.42",
Expand All @@ -19,7 +19,7 @@
"@slidev/theme-default": "*",
"@slidev/theme-seriph": "*",
"gray-matter": "^4.0.3",
"pdf-img-convert": "^1.2.1",
"pdf-img-convert": "^2.0.0",
"slidev-addon-rabbit": "^0.3.0",
"slidev-theme-penguin": "^2.2.0",
"vite-svg-loader": "^5.1.0"
Expand All @@ -30,7 +30,7 @@
"glob": "^10.3.15",
"playwright-chromium": "^1.33.0",
"scaffdog": "^3.0.0",
"ts-node": "^10.9.2",
"tsx": "^4.19.1",
"typescript": "^5.4.5"
},
"slidev": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var fs = require('fs');
var pdf2img = require('pdf-img-convert');
import fs from 'fs';
import pdf2img from 'pdf-img-convert';

const pdf = process.argv[2];
const dest = process.argv[3];

async function convert(input, output) {
async function convert(input:string, output:string) {
const pdfArray = await pdf2img.convert(input, {page_numbers: [1]});
fs.writeFileSync(output, pdfArray[0], "base64");
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/setup-spa.js → scripts/setup-spa.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs');
const path = require('path');
const matter = require('gray-matter');
import fs from 'fs';
import path from 'path';
import matter from 'gray-matter'

const tag = process.argv[2];
const pagesUrl = process.argv[3];
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-index-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {copyFileSync, readFileSync, writeFileSync} from 'fs';
import {execSync} from 'child_process';
import {globSync} from 'glob';

// ts-node scripts/update-index-pages.ts [gh-pages.dir]
// tsx scripts/update-index-pages.ts [gh-pages.dir]
const args = process.argv.slice(2);
let dir = args[0] || 'gh-pages/';
dir[dir.length - 1] === '/' ? dir : dir + '/';
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "NodeNext", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
Expand Down

0 comments on commit 39ff924

Please sign in to comment.