@here/generator-harp.gl

0.28.0 • Public • Published

Harp.gl yeoman Generator

Yeoman generator for harp.gl based projects.

Pre-requirements

  • node.js
  • yeoman - Install globally with npm install -g yo or use without installation with npx like this npx yo.
  • By default, generated app retrieves map data from HERE Vector Tiles Service. You need an apikey that you can generate yourself. Please see our Getting Started Guide.

Usage

mkdir 3dmap-example
cd 3dmap-example
npx -p yo -p @here/generator-harp.gl yo @here/harp.gl
> package name 3dmap-example name:

This command will generate complete, clean project based on Node.js, Webpack, Typescript. Set you access token in View.ts:

const dataSource = new VectorTileDataSource({
    baseUrl: "https://vector.hereapi.com/v2/vectortiles/base/mc",
    authenticationCode: "YOUR-APIKEY"
});

Then start it using webpack-dev-server:

npm start
(...)
> 3dmap-example@1.0.0 start /home/user/generator-test
> webpack-dev-server

Project is running at http://localhost:8080/

Open http://localhost:8080/ in your browser to see the running application.

Generator Development & Testing

Automatic tests.

yarn test

Manual tests:

mkdir ~/generator-harp.gl-test #  create folder for test app
cd ~/generator-harp.gl-test

Now you can check how your working copy of generator works, by running this after each change:

yo ~/src/harp.gl/@here/generator-harp.gl/generators/app/ # generate app
npm install && npm run start

Readme

Keywords

Package Sidebar

Install

npm i @here/generator-harp.gl

Weekly Downloads

1

Version

0.28.0

License

Apache-2.0

Unpacked Size

26.7 kB

Total Files

20

Last publish

Collaborators

  • here-bot
  • here-maps
  • heremaps