@here/generator-harp.gl
v0.28.0
Published
Yeoman generator for harp.gl projects
Keywords
Readme
Harp.gl yeoman Generator
Yeoman generator for harp.gl based projects.
Pre-requirements
- node.js
- yeoman - Install globally with
npm install -g yoor use without installation withnpxlike thisnpx yo. - By default, generated app retrieves map data from HERE Vector Tiles Service. You need an
apikeythat 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
(...)
> [email protected] 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 testManual tests:
mkdir ~/generator-harp.gl-test # create folder for test app
cd ~/generator-harp.gl-testNow 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