@compiiile/compiiile 2.21.1 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,7 +51,7 @@ const defaultTheme = site.theme
51
51
  We store the new page URL to redirect to in the sessionStorage because it follows this flow:
52
52
  - the `switch-page-render` event is sent
53
53
  - we receive it just below, and check if we are on the updated file's URL : we store the new URL to redirect to
54
- - the whole page reloads because Compiiile vite's module in invalidated to reload its config and all files
54
+ - the whole page reloads because Compiiile vite's module is invalidated to reload its config and all files
55
55
  - only when the reload is done, we get to the second `if`, where we change the current route URL
56
56
  - the redirect is not made before the vite's module invalidation because the reload prevents the redirection from happening
57
57
  */
package/bin/config.js CHANGED
@@ -39,8 +39,7 @@ if (packageDir) {
39
39
  viteServerFsAllowList.push(packageDir)
40
40
  }
41
41
 
42
- let sharedContext = new Context()
43
- sharedContext.filesTree = await sharedContext.scanDirectoryRecursively(".")
42
+ let sharedContext = await (new Context()).init()
44
43
 
45
44
  const astroConfig = {
46
45
  server: {
package/bin/loadConfig.js CHANGED
@@ -160,7 +160,7 @@ export const loadConfig = async () => {
160
160
 
161
161
  const localIntegrations = []
162
162
 
163
- if (/true/i.test(argv.printReady)) {
163
+ if (/true/i.test(argv.printReady) && (!argv.integrations || !argv.integrations?.find(integration => integration.name === "compiiile-print-integration"))) {
164
164
  const compiiilePrintIntegration = (await import("@compiiile/compiiile-print")).default
165
165
  localIntegrations.push(compiiilePrintIntegration())
166
166
  }
@@ -24,6 +24,8 @@ export default function compiiile(sharedContext) {
24
24
  return
25
25
  }
26
26
 
27
+ sharedContext = await sharedContext.init()
28
+
27
29
  return `const fileList = ${JSON.stringify(sharedContext.fileList)};\n\n
28
30
  const filesTree = ${JSON.stringify(sharedContext.filesTree)};\n\n
29
31
  const routeList = ${JSON.stringify(sharedContext.routeList)};\n\n
@@ -15,7 +15,11 @@ export default class {
15
15
  WORKSPACE_BASE_PATH = "c"
16
16
  SLIDES_BASE_PATH = "s"
17
17
 
18
- constructor() {
18
+ constructor(directoryPath = ".") {
19
+ this.directoryPath = directoryPath
20
+ }
21
+
22
+ async init(){
19
23
  this.fileList = []
20
24
  this.filesTree = []
21
25
  this.routeList = []
@@ -33,6 +37,10 @@ export default class {
33
37
  theme: process.env.VITE_COMPIIILE_THEME,
34
38
  collapseFolders: JSON.parse(process.env.VITE_COMPIIILE_COLLAPSE_FOLDERS)
35
39
  }
40
+
41
+
42
+ this.filesTree = await this.scanDirectoryRecursively(this.directoryPath)
43
+ return this
36
44
  }
37
45
 
38
46
  generateRoutePathFromFilePath(filePath, hash = "", asSlides = false, entryFileMatcher) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@compiiile/compiiile",
3
3
  "private": false,
4
- "version": "2.21.1",
4
+ "version": "2.22.0",
5
5
  "description": "The most convenient way to render a folder containing markdown files. Previewing and searching markdown files has never been that easy.",
6
6
  "author": "AlbanCrepel <alban.crepel@gmail.com>",
7
7
  "license": "GPL-3.0-only",
@@ -21,22 +21,22 @@
21
21
  "url": "git+https://github.com/compiiile/compiiile.git"
22
22
  },
23
23
  "dependencies": {
24
- "@astrojs/markdown-remark": "^7.2.2",
25
- "@astrojs/mdx": "^7.0.5",
26
- "@astrojs/sitemap": "^3.7.3",
27
- "@astrojs/vue": "^7.0.2",
24
+ "@astrojs/markdown-remark": "^7.3.6",
25
+ "@astrojs/mdx": "^8.1.3",
26
+ "@astrojs/sitemap": "^3.7.4",
27
+ "@astrojs/vue": "^7.1.2",
28
28
  "@babel/core": "^8.0.1",
29
29
  "@babel/eslint-parser": "^8.0.1",
30
30
  "@babel/parser": "^8.0.4",
31
- "@compiiile/compiiile-print": "1.1.1",
31
+ "@compiiile/compiiile-print": "2.0.0",
32
32
  "@eslint/compat": "^2.1.0",
33
33
  "@eslint/js": "^10.0.1",
34
34
  "@fontsource-variable/archivo": "^5.3.0",
35
35
  "@fontsource-variable/dm-sans": "^5.3.0",
36
36
  "@fontsource-variable/jetbrains-mono": "^5.3.0",
37
37
  "@phosphor-icons/web": "^2.1.2",
38
- "astro": "^7.2.2",
39
- "astro-seo": "^1.1.0",
38
+ "astro": "^7.4.7",
39
+ "astro-seo": "^1.2.0",
40
40
  "c12": "^3.3.4",
41
41
  "eslint": "^10.8.1",
42
42
  "eslint-config-prettier": "^10.1.8",
@@ -45,22 +45,22 @@
45
45
  "fzf": "^0.5.2",
46
46
  "globals": "^17.0.0",
47
47
  "hastscript": "^9.0.1",
48
- "minimatch": "^10.2.5",
48
+ "minimatch": "^10.2.6",
49
49
  "node-emoji": "^2.2.0",
50
- "package-directory": "^8.1.0",
50
+ "package-directory": "^8.2.0",
51
51
  "parse-gitignore": "^2.0.0",
52
52
  "piccolore": "^0.1.3",
53
53
  "prettier": "^3.7.4",
54
54
  "rehype-autolink-headings": "^7.1.0",
55
55
  "rehype-slug": "^6.0.0",
56
56
  "remark-emoji": "^5.0.2",
57
- "reveal.js": "^6.0.1",
57
+ "reveal.js": "^6.0.2",
58
58
  "slugify": "^1.6.6",
59
59
  "typescript": "^5.9.3",
60
60
  "uuid": "^13.0.0",
61
61
  "vfile-matter": "^5.0.1",
62
- "vite": "^8.2.1",
63
- "vue": "^3.5.41",
62
+ "vite": "^8.3.7",
63
+ "vue": "^3.5.45",
64
64
  "yargs": "^18.0.0",
65
65
  "zod": "^3.25.76"
66
66
  },