Skip to content

micschro/generator-yfiles-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generator-yfiles-app NPM version

A yeoman generator that scaffolds a yFiles for HTML powered application. Requires a local yFiles for HTML package which can be obtained and evaluated here.

Installation

First, install Yeoman and generator-yfiles-app using npm (we assume you have pre-installed node.js). The current version scaffolds yFiles for HTML 2.0 projects.

npm install -g yo
npm install -g generator-yfiles-app

Then generate your new project:

yo yfiles-app

Simply answer a few questions and everything you need for your yFiles app is at the right place.

Scaffold previous yFiles for HTML versions

To scaffold a yFiles for HTML 1.3 project, please install v0.9.4 of the generator-yfiles-app, i.e:

npm install -g generator-yfiles-app@0.9.4

To scaffold a yFiles for HTML 1.4 project, please install v0.9.5 of the generator-yfiles-app, i.e:

npm install -g generator-yfiles-app@0.9.5

About this generator

This generator scaffolds a yFiles for HTML application. It allows you to choose between different build tools and programming languages (ECMAScript 5, ECMAScript 6 (+Babel) and TypeScript).

Here is a rundown of the options you have:

Application name

The name of the app, the first class and the generated main files. Only valid JavaScript identifiers (consisting of [a-zA-Z$_]) are accepted.

Module name

The name of the module/namespace the first class shall live in. Only valid JavaScript identifiers (consisting of [a-zA-Z$_]) are accepted.

Path of yFiles for HTML package

The path to the root of a valid yFiles for HTML package (e.g. "path/to/yFilesPackage"). This package must contain the following folders:

  • "lib/yfiles"
  • "deployment"
  • "ide-support"

Path of license file

Usually your yFiles package contains a license.js file at top level. If not, you may provide a path to a valid license, e.g. "path/to/license.js".

Which build tool do you want to use?

You can choose between those build tools:

  • none: No build file is provided and you can run your app directly without the need of a compile step.
  • Grunt: A simple Gruntfile.js is provided, that packages the required yFiles modules to a single file but leaves your code unchanged.
  • Grunt + Browserify Packages and minifies all JavaScript resources to a single file using Browserify.
  • Grunt + Webpack Packages all JavaScript resources to a single file using Webpack.

Module loading method

Decide whether you want to load the library via

  • AMD require,
  • systemjs or
  • <script>-tags. This option will not be available when Webpack or Browserify have been selected as build tool, as the resulting package is included via <script>-tag.

Which modules do you want to use?

Choose which yFiles modules your app will need. For an overview of these take a look at the Developer's Guide's module section. The generator will automatically optimize the requires.

What else do you want?

  • Use yfiles-typeinfo.js Includes the yfiles-typeinfo.js file which provides runtime type checking during development time. It is recommended to exclude this file in releases. Further information can be found here
  • npm & git Runs the node generator, which initializes a npm package and git.
  • Visual Studio Code integration Creates additional files required for Visual Studio Codes' IntelliSense as well as a task runner if applicable.
  • ECMAScript 6 (+babel) Enables you to use ECMAScript 6 (only available if you have chosen a build tool).
  • TypeScript Use TypeScript instead of plain JavaScript (only available if have chosen a build tool).

Choosing TypeScript will disable ECMAScript (+Babel).

License

MIT © yWorks GmbH

About

A yeoman generator that scaffolds a yFiles for HTML powered application. Requires local yFiles package (http://www.yworks.com/yfileshtml).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 57.8%
  • HTML 42.2%