Skip to content

Commit

Permalink
fix(playground): locales path
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Mar 26, 2022
1 parent 6a6966e commit 97328dd
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

[build]
publish = "packages/playground/dist"
command = "npm install -g pnpm && pnpm install && pnpm build"
command = "npm install -g pnpm && pnpm install && pnpm build --filter playground"
1 change: 1 addition & 0 deletions norm.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export default defineConfig({
],
},
},
'packages/utils': libraryConfig,
'packages/plugin-breaks': libraryConfig,
'packages/plugin-footnotes': libraryConfig,
'packages/plugin-frontmatter': libraryConfig,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "npm run clean && norm build",
"clean": "rm -rf packages/*/{dist,svelte}",
"dev": "echo 'export * from \"../src/index\"' > packages/bytemd/svelte/index.js && norm",
"dev": "norm",
"docs:build": "vitepress build docs",
"docs:dev": "vitepress dev docs",
"docs:serve": "vitepress serve docs",
Expand Down
13 changes: 13 additions & 0 deletions packages/playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ByteMD Playground</title>
<script
async
src="https://www.googletagmanager.com/gtag/js?id=UA-145047249-6"
></script>
<script>
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag('js', new Date())

gtag('config', 'UA-145047249-6')
</script>
</head>
<body>
<script type="module" src="/src/index.ts"></script>
Expand Down
12 changes: 4 additions & 8 deletions packages/playground/src/app.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,16 @@
}
const locales = stripPrefixes(
import.meta.globEager('/node_modules/bytemd/src/locales/*.json')
import.meta.globEager('/node_modules/bytemd/locales/*.json')
)
const gfmLocales = stripPrefixes(
import.meta.globEager('/node_modules/@bytemd/plugin-gfm/src/locales/*.json')
import.meta.globEager('/node_modules/@bytemd/plugin-gfm/locales/*.json')
)
const mathLocales = stripPrefixes(
import.meta.globEager(
'/node_modules/@bytemd/plugin-math/src/locales/*.json'
)
import.meta.globEager('/node_modules/@bytemd/plugin-math/locales/*.json')
)
const mermaidLocales = stripPrefixes(
import.meta.globEager(
'/node_modules/@bytemd/plugin-mermaid/src/locales/*.json'
)
import.meta.globEager('/node_modules/@bytemd/plugin-mermaid/locales/*.json')
)
let value = markdownText
Expand Down
1 change: 0 additions & 1 deletion packages/playground/src/env.d.ts

This file was deleted.

0 comments on commit 97328dd

Please sign in to comment.