Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

aurelia-toolbelt/aurelia-plugin-skeleton-typescript

Repository files navigation

Imgur

Aurelia plugin skeleton with Typescript

You need to make an Aurelia Typescript plugin? If "YES!!!", you have just found the perfect place to start 😄

Here is the key components of the plugin skeleton:

  1. Typescript as a typed super set of JavaScript that compiles to plain JavaScript.
  2. FuseBox as a bundler/module loader for the sample (incl fuse-box-aurelia-loader)
  3. Jest a delightful JavaScript test framework.
  4. Puppeteer as headless Chrome for E2E testing.
  5. FuseBox Type Checker as a simple helper to do type-checking & linting while developing and producing the final build.

How to build and run sample

  • npm run watch

    • Launches sample and watches src folder
    • it does the type-checking and ts-lints on every save
    • Now open http://localhost:4444 to see your plugin in action.
  • npm run build

    • Produces amd/commonjs/system/es2015 builds
    • This will NOT emit/update files if you have any typescript or tslint errors

How to rename to your own plugin

  • run: npm run setup
    • Answer the question about name and version.

How to run unit tests

  • To run the unit test with Jest run : npm run test:unit
    • Watch mode: npm run test:unit -- --watch
    • See the coverage: npm run test:unit -- --coverage

How to run E2E tests

  • Simply run: npm run test:e2e
    • Make sure you've run the sample prior to the e2e test by running the npm watch command.

Before you start coding(or publishing an npm package) you also need to check the followings:

  • delete .git folder and run git init
  • update package.json with
    • description
    • keywords
    • homepage
    • bugs
    • license
    • author
    • repository
    • etc etc