Skip to content

Commit

Permalink
Merge pull request #62 from sword-x-shield/fix/site-error
Browse files Browse the repository at this point in the history
fix(site): error
  • Loading branch information
ChuHoMan authored Mar 20, 2023
2 parents 5db8652 + bd61263 commit a139779
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 1,747 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ yarn-error.log*

# local env files
.eslintcache

packages/site/public/pizza-ui/pizza-ui.esm.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ English | [简体中文](./README-zh_CN.md)

## 🚀 Install

**We recommend using yran or pnpm to install**,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
**We recommend using yarn or pnpm to install**,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.

```bash
$ yarn add pizza-ui
Expand Down
6 changes: 5 additions & 1 deletion packages/pizza-site-parser/src/plugins/live-injections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export function PLiveInjectionsPlugin(options: IInjectOptions = {}): PluginOptio
imports: {
// TODO: 动态获取 vue 版本; 处理 pizza-ui
'vue': 'https://unpkg.com/@vue/[email protected]/dist/runtime-dom.esm-browser.js',
'pizza-ui/': env === 'development' ? 'http://localhost:5173/pizza-ui' : 'https://sword-x-shield.github.io/pizza-ui/pizza-ui/',
'compute-scroll-into-view': 'https://unpkg.com/[email protected]/dist/index.js',
'scroll-into-view-if-needed': 'https://www.unpkg.com/[email protected]/es/index.js',
'smooth-scroll-into-view-if-needed': 'https://unpkg.com/[email protected]/es/index.js',
'lodash-es': 'https://unpkg.com/[email protected]/lodash.js',
'pizza-ui/': env === 'development' ? 'http://localhost:5173/pizza-ui/pizza-ui/' : 'https://sword-x-shield.github.io/pizza-ui/pizza-ui/',
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/pizza-ui/build/volar-inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fse from 'fs-extra';

const cwd = process.cwd();
const dic = path.resolve(cwd, './dist/pizza-ui.esm.js');
const targetDic = path.resolve(cwd, '../site/public/pizza/pizza-ui.esm.js');
const targetDic = path.resolve(cwd, '../site/public/pizza-ui/pizza-ui.esm.js');

fse.copySync(dic, targetDic, {
overwrite: true,
Expand Down
24 changes: 0 additions & 24 deletions packages/site/.gitignore

This file was deleted.

Loading

0 comments on commit a139779

Please sign in to comment.