Giter Club home page Giter Club logo

generator-aurelia's Introduction

generator-aurelia

This is a Yeoman Generator for the Skeleton App of the Aurelia platform. It sets up a standard navigation-style app using gulp to build your ES6 code with Babel. Karma/Jasmine testing is configured as well.

For more info please visit the official site: http://www.aurelia.io/

Please note that there is an official Aurelia CLI, which performs all the tasks this generator does and much more. Head over to https://github.com/aurelia/cli in order to find out more.

Prerequisite

This generator will use JSPM, Aurelias package manager of choice, which performs GitHub queries to install semver packages, but GitHub has a rate limit on anonymous API requests. It is advised that you configure jspm with your GitHub credentials in order to avoid problems. You can do this by executing jspm registry config github and following the prompts. If you choose to authorize jspm by an access token instead of giving your password (see GitHub Settings > Personal Access Tokens), public_repo access for the token is required.

Running The App

The recent update will take care of running npm install and jspm install after downloading the boilerplate app, so this shortens the process to get up and running.

  1. Verify that Yeoman is installed
npm install -g yo
  1. Install this generator
npm install -g generator-aurelia
  1. Ensure that Gulp is installed. If you need to install it, use the following command:
npm install -g gulp
  1. Ensure that jspm is installed. If you need to install it, use the following command:
npm install -g jspm
  1. Create a new project folder and move into it in the terminal
mkdir YOUR_PROJECT_NAME
cd YOUR_PROJECT_NAME
  1. Use Github API Token if the generator prompts a rate limit error. Execute the following command:
export GITHUB_TOKEN=YOUR_ACCESS_TOKEN

Windows users should set a user environment variable called GITHUB_TOKEN with the value being your actual token.

  1. Execute the following command
yo aurelia
  1. To run the app, execute the following command:
gulp watch
  1. Browse to http://localhost:9000 to see the app. You can make changes in the code found under src and the browser should auto-refresh itself as you save files.

Update the skeleton jspm dependencies

If you're inside your skeleton folder you can run the following command to update your installation and get the latest versions of the dependencies used:

yo aurelia:update

Command line options

--skip-install

yo aurelia --skip-install will skip the npm and jspm install.

--proxy

yo aurelia --proxy=http://my.proxy:8080 will install the skeleton app resepecting the given proxy settings

Creating a new page

In order to create a new Aurelia Page just enter the following command inside your project root:

yo aurelia:page YOURPAGENAME

If you get an error like Error: spawn git ENOENT when executing the yo command, you should check whether GIT is installed and accessible from the command line

This will create a View and ViewModel with the given name inside the ./src folder

Credits

Thanks to Addy Osmani for his awesome generator-boilerplate repo.

generator-aurelia's People

Contributors

ams3cf avatar andyshora avatar bbosman avatar mika76 avatar paulvanbladel avatar zewa666 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.