Created
February 6, 2019 00:36
-
-
Save CuddleBunny/a4a51c6f02a27f0219eda3ba4310e307 to your computer and use it in GitHub Desktop.
aurelia-cli-plugin-template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="aurelia-loader-webpack/src/webpack-hot-interface"/> | |
import {Aurelia} from 'aurelia-framework' | |
import environment from './environment'; | |
import {PLATFORM} from 'aurelia-pal'; | |
import * as Bluebird from 'bluebird'; | |
// remove out if you don't want a Promise polyfill (remove also from webpack.config.js) | |
Bluebird.config({ warnings: { wForgottenReturn: false } }); | |
export function configure(aurelia: Aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.feature(PLATFORM.moduleName('resources/index')); | |
// Uncomment the line below to enable animation. | |
// aurelia.use.plugin(PLATFORM.moduleName('aurelia-animator-css')); | |
// if the css animator is enabled, add swap-order="after" to all router-view elements | |
// Anyone wanting to use HTMLImports to load views, will need to install the following plugin. | |
// aurelia.use.plugin(PLATFORM.moduleName('aurelia-html-import-template-loader')); | |
// Use js/tsconfig.json paths to mock installation from a package manager? | |
aurelia.use.plugin(PLATFORM.moduleName('my-aurelia-cli-plugin')); | |
aurelia.use.developmentLogging(environment.debug ? 'debug' : 'warn'); | |
if (environment.testing) { | |
aurelia.use.plugin(PLATFORM.moduleName('aurelia-testing')); | |
} | |
return aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app'))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<hello-world></hello-world> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>${message}</h1> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class HelloWorld { | |
message = 'Hello World!'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {FrameworkConfiguration} from 'aurelia-framework'; | |
import {HelloWorld} from './elements/hello-world'; | |
export function configure(config: FrameworkConfiguration) { | |
//config.globalResources([]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment