Carte blanche implementation for angular2 WIP
TypeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
frontend
server
.babelrc
.clog.toml
.editorconfig
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
helpers.js
karma.conf.js
package.json
plugin.js
tsconfig.json
tslint.json
typedocparser.js
webpack.config.js
webpack.test.js

README.md

carte Blanche Angular2 Build Status

CarteBlanche plugin for Angular2.

Usage

var carteBlancheAngular2 = require('carteBlancheAngular2')

plugins: [
  // Plugin: CarteBlanche
  // Description: Provides a carte blanche page for testing components.
  // Allows to test each component and its variations separatly
  new CarteBlanche({
    componentRoot: 'src/app/components',
    filter: /.*\.component.ts$/, // Matches all files ending in .ts
    plugins: [
      new Angular2Plugin({
        variationFolderName: 'variations',
        port: 7000,
        hostname: 'localhost',
        bundle: 'main.js',
      })
    ]
  })
]

For now a main bundle must be provided. And additional files can be provided using the files property. in the future support for CommonChunks plugin will be added so that you dont have to specify your files explicitly.

Options

  • variationFolderName (default: variations): The name of the folders that stores the variation files.
new carteBlancheAngular2({
  variationFolderName: 'examples'
})
  • port (default: 8082): The port the variations server runs at.

    new carteBlancheAngular2({
      port: 7000
    })
  • hostname (default: localhost): The URL the variations server runs at.

    new carteBlancheAngular2({
      hostname: 'mydomain.com'
    })
  • bundle (default: main.js): The name of the main bundle that holdes the application.

    new carteBlancheAngular2({
      bundle: 'main.js'
    })