Skip to content

Commit

Permalink
Add license and readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsAnunesS committed Nov 15, 2022
1 parent 48b4847 commit 71f17b4
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 2 deletions.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# VueJS Widget Template

This template should help get you started developing a Permapage Widget with Vue 3 in Vite.

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

## Type Support for `.vue` Imports in TS

TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:

1. Disable the built-in TypeScript Extension
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.

## Customize configuration

See [Vite Configuration Reference](https://vitejs.dev/config/).

## Project Setup

1. Change the informations of the project in `package.json`.
2. Change the id of the widget in `src/main.ts` and `index.html`.

```sh
npm install
```

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Type-Check, Compile and Minify for Production

**Note:** This will also generate a `dist` folder with the compiled widget.
**Note:** Your CSS is inside `dist/widget.js`.

```sh
npm run build
```

### Lint with [ESLint](https://eslint.org/)

```sh
npm run lint
```

### Deploy to [Permapages](https://pages.arweave.dev/)

**Note:** You need to update your `package.json`, `index.html` and `src/main.ts` with your own information.

```sh
npm run build
```

```sh
npm run deploy <path to your JWT>
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-permawidget-vue",
"version": "1.0.0",
"version": "1.0.1",
"description": "🛠️ The Create Permapages widget boilerplate",
"bin": {
"create-permawidget-vue": "./tasks/cpa.js"
Expand Down
2 changes: 2 additions & 0 deletions tasks/cpa.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ async function main() {
execSync("npx rimraf ./package-lock.json");
execSync("npx rimraf ./.gitignore");
execSync("npx rimraf ./tasks");
execSync("npx rimraf ./LICENSE");
execSync("npx rimraf ./README.md");

console.log("Copying Template to root");
// copy everything from template to root
Expand Down
1 change: 0 additions & 1 deletion template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ See [Vite Configuration Reference](https://vitejs.dev/config/).

## Project Setup


1. Change the informations of the project in `package.json`.
2. Change the id of the widget in `src/main.ts` and `index.html`.

Expand Down

0 comments on commit 71f17b4

Please sign in to comment.