Skip to content

Commit

Permalink
[example][frameworks] Add support for Parcel framework (vercel#6836)
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett authored Oct 14, 2021
1 parent f985d95 commit be5c0da
Show file tree
Hide file tree
Showing 9 changed files with 4,673 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/parcel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
.parcel-cache
dist
/.pnp
.pnp.js
.DS_Store
.vercel
34 changes: 34 additions & 0 deletions examples/parcel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This is a vanilla web app built with [Parcel](https://parceljs.org).

## Getting Started

Run the dev server:

```bash
yarn start
# or
npm start
```

And open [localhost:1234](http://localhost:1234) in your browser!

As you make changes, you should see your app automatically update in the browser without even refreshing the page!

## Learn More

- [Getting started guide](https://parceljs.org/getting-started/webapp/)
- [Documentation](https://parceljs.org/docs/)

## Deploy Your Own

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/parcel&template=parcel)

_Live Example: https://parcel.examples.vercel.com_

### Deploying From Your Terminal

You can deploy your new Parcel project with a single command from your terminal using [Vercel CLI](https://vercel.com/download):

```shell
$ vercel
```
12 changes: 12 additions & 0 deletions examples/parcel/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "parcel-app",
"private": true,
"source": "src/index.html",
"scripts": {
"start": "parcel",
"build": "parcel build"
},
"devDependencies": {
"parcel": "^2.0.0"
}
}
1 change: 1 addition & 0 deletions examples/parcel/src/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('Hello world!');
13 changes: 13 additions & 0 deletions examples/parcel/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>My First Parcel App</title>
<link rel="stylesheet" href="styles.css" />
<script type="module" src="app.js"></script>
</head>
<body>
<h1>Hello, Parcel!</h1>
<p>This is a vanilla web app built with Parcel 2!<br>Check out the <a href="https://parceljs.org/getting-started/webapp/" target="_blank">getting started guide</a> and the <a href="https://parceljs.org/docs/" target="_blank">documentation</a> to learn more!</p>
</body>
</html>
18 changes: 18 additions & 0 deletions examples/parcel/src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
body {
text-align: center;
}

h1 {
color: hotpink;
font-family: cursive;
font-size: 55px;
}

p {
font-family: Helvetica, Arial, sans-serif;
line-height: 1.5em;
}

a {
color: dodgerblue;
}
Loading

0 comments on commit be5c0da

Please sign in to comment.