Skip to content

Commit

Permalink
Add development server and document in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hegman committed Sep 4, 2019
1 parent 346e8b0 commit 5b395fe
Show file tree
Hide file tree
Showing 4 changed files with 1,037 additions and 28 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ A simple lightweight (9kb/3kb gzipped) Mapbox GL JS Vue component. Great for qui
- [Events](#map-events)
- [Plugins](#plugins)
- [Popups](#popups)
- [Development](#development)

## Installation

Expand Down Expand Up @@ -522,10 +523,26 @@ export default Vue.extend({
</script>
```

## Support
## Development

Please [open an issue](https://github.com/phegman/mapbox-gl-vue.js/issues) for support.
### Install dependencies

## Contributing
```bash
yarn install
```

### Start development server

Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/phegman/mapbox-gl-vue.js/compare).
This will start a dev server with [HMR](https://webpack.js.org/guides/hot-module-replacement/) at `localhost:8080`.

```bash
ACCESS_TOKEN=yourAccessToken yarn dev
```

### Linting

Please make sure all your code passes linting before opening a PR.

```bash
yarn lint
```
5 changes: 5 additions & 0 deletions build-configs/webpack.demo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,9 @@ module.exports = {
},
}),
],
devServer: {
contentBase: path.resolve(__dirname, '../dist'),
port: 8080,
hot: true,
},
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.39.3",
"webpack-cli": "^3.3.7"
"webpack-cli": "^3.3.7",
"webpack-dev-server": "^3.8.0"
},
"scripts": {
"build": "rimraf dist & yarn build:umd & yarn build:es & yarn build:unpkg & yarn build:demo",
"build:umd": "rollup --config build-configs/rollup.umd.config.js",
"build:es": "rollup --config build-configs/rollup.es.config.js",
"build:unpkg": "rollup --config build-configs/rollup.iife.config.js",
"build:demo": "webpack --config build-configs/webpack.demo.config.js --mode production",
"lint": "./node_modules/.bin/eslint src/**/*.{vue,ts}"
"lint": "./node_modules/.bin/eslint src/**/*.{vue,ts}",
"dev": "webpack-dev-server --config build-configs/webpack.demo.config.js --mode development"
},
"dependencies": {},
"husky": {
Expand Down
Loading

0 comments on commit 5b395fe

Please sign in to comment.