Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daggerok/parcel-vue-ts-decorator-example

Awesome Vue TypeScript Component usage (decorators) with parcel-bundler build
https://github.com/daggerok/parcel-vue-ts-decorator-example

parcel parcel-bundler parcel-ts parcel-typescript parcel-vue parceljs typescript vue vue-components vue-parcel vue-router vue-ts vue-typescript vue2 vuejs vuejs2

Last synced: 4 days ago
JSON representation

Awesome Vue TypeScript Component usage (decorators) with parcel-bundler build

Awesome Lists containing this project

README

        

## Vue.js + TypeScript (with decorators) + Parcel [![CI](https://github.com/daggerok/parcel-vue-ts-decorator-example/actions/workflows/ci.yaml/badge.svg)](https://github.com/daggerok/parcel-vue-ts-decorator-example/actions/workflows/ci.yaml)
Awesome Vue TypeScript Component usage (decorators) with parcel-bundler build

__Development__

```
npm i
npm start
```

__Production Build__

```bash
npm run build
# or: npm run serve
```

__Run Unit Tests__

```bash
npm t
```

Note that new components should be added to test_map.js in order to make them easily available to the unit tests.

__Write and Run Integration Tests__

Begin by running the parcel command to start serving the project locally on port 1234.

Then export an env var for the Cypress baseUrl

```bash
export CYPRESS_baseUrl=http://localhost:1234
```

or in PowerShell

```batch
$env:CYPRESS_baseUrl = "http://localhost:1234"
```

Then launch Cypress to run tests

```bash
./node_modules/.bin/cypress open
```

__TSLint Setup__

To run tslint manually (doesn't lint in .vue files yet)

```bash
npm run lint
```

__GitHub Pages__

See `.travis.yml`, but in short:

```bash
npm run gh-pages
```

__Links and Resources__

* [GitHub: vuejs/vue-class-component - see that example as a reference](https://github.com/vuejs/vue-class-component/blob/master/example/tsconfig.json)
* [Read Vue TypeScript article](https://github.com/Microsoft/TypeScript-Vue-Starter#using-decorators-to-define-a-component)
* [Parcel: interpolate %baseHref% variable into html](https://github.com/krotovic/parcel-plugin-interpolate-html)