aurelia-cli

aurelia-i18n with aurelia-cli gives error plugin.load is not a function

混江龙づ霸主 提交于 2019-12-11 09:46:24
问题 has anyone been able to successfully use aurelia-i18n with a project started using aurelia-cli written in TypeScript? I have tried a couple of projects following the instructions in the github project doco, but it comes up with an error in the browser when running it. vendor-bundle.js:4872 Uncaught TypeError: plugin.load is not a function at Module.<anonymous> (vendor-bundle.js:4872) at vendor-bundle.js:3911 at on (vendor-bundle.js:4294) at Module.callPlugin (vendor-bundle.js:4732) at Module

Aurelia Testing Composed Custom Element

孤街浪徒 提交于 2019-12-11 05:46:15
问题 Unit testing question: When I test a component as per aurelia.io example, ... component = StageComponent .withResources('components/comp/comp') .inView('<comp data.bind="info"></comp>') .boundTo({info: data}); ... I can query document and check attribute values of DOM nodes. const nameElement = document.getElementById('elem-id'); When I try testing a composed element, ... component = StageComponent .withResources('components/elemy/elemy') .inView('<compose view.bind="components/elemy/elemy

How to load an Aurelia plugin in Karma

南笙酒味 提交于 2019-12-10 17:04:07
问题 I've this ViewModel which is a login confirmation page viewmodel: src/pages/confirm.ts import { autoinject } from 'aurelia-framework'; import { Router, NavigationInstruction } from 'aurelia-router'; import { ValidationControllerFactory, ValidationController, ValidationRules } from 'aurelia-validation'; import { LoginService } from '../services/login.service'; import { Settings } from '../config/settings'; import { State } from '../services/state'; import { Helpers } from '../services/helpers'

Aurelia CLI include Bootstrap Glyphicons

蹲街弑〆低调 提交于 2019-12-10 02:59:02
问题 I'm trying to include Bootstrap in my Aurelia CLI project, and the CSS and JS work fine. The only problem I have is the glyphicons require font files to be loaded. I use this configuration: "dependencies": [ { "name": "bootstrap", "path": "../node_modules/bootstrap/dist", "main": "js/bootstrap.min", "deps": ["jquery"], "exports": "$", "resources": [ "css/bootstrap.min.css", "fonts/glyphicons-halflings-regular.woff2" ] } ] But I get an error containing this line: path: 'C:\Users\randy

Bootstrap 4 error “Bootstrap dropdown require Popper.js”, with Aurelia CLI and Require.js

时光怂恿深爱的人放手 提交于 2019-12-10 01:09:59
问题 I'm having trouble configuring Bootstrap 4 beta in an Aurelia CLI app (v0.31.1) with requirejs and using TypeScript. After having tried several config variations I keep on getting the following console error: Uncaught Error: Bootstrap dropdown require Popper.js Here are the steps to reproduce. First, install the packages: $ npm install --save jquery bootstrap@4.0.0-beta popper.js Next, I've configured aurelia.json : "jquery", { "name": "popper.js", "path": "../node_modules/popper.js/dist/umd"

Client side cache busting using the CLI

一曲冷凌霜 提交于 2019-12-09 00:01:35
问题 We're using the aurelia-cli . The tasks include these: build.json build.ts process-css.ts process-markup.ts process-sass.ts run.json run.ts test.json test.ts transpile.ts How if at all do we do a cache-busting solution the with cli? What we've tried already is to increment the number of the scripts directory, so that it goes scripts1 , scripts2 , scriptsN . 回答1: 0.20.0 Support It's my lucky day. An aurelia-cli release from 8 hours ago says this: Features: Support bundle revision numbers

Aurelia CLI PWA with Webpack and Workbox

心不动则不痛 提交于 2019-12-08 05:37:59
问题 Last night I attempted to create a PWA using the latest aurelia-cli (version 0.32.0). I created a custom setup with au new that uses Webpack and TypeScript. After that I followed the Workbox with Webpack instructions from Google. npm install workbox-cli --saveDev npm install workbox-webpack-plugin --saveDev service worker is running offline fails doesn't find webpack-dev-server.js (not in dist), app.xxx.bundle.js and vendor.asdf.js are not in the generated sw.js even though in dist folder au

Unable to use Aurelia plugin

风格不统一 提交于 2019-12-08 01:24:30
问题 I'm trying to move one of my custom elements into a plug-in so that I can re-use it across projects. I had a look at the skeleton plugin and noticed that it has a src/index.js that returns a config with all custom elements defined as globalResources . So I tried the same thing and I basically have: src/index.js export function configure (config) { config.globalResources([ './google-map', './google-map-location-picker', './google-map-autocomplete' ]); } And then I have each one of my custom

How to import packages within my Aurelia application

拈花ヽ惹草 提交于 2019-12-07 23:03:44
问题 I have a successful app running using Aurelia, however I developed it using VSCode and the skeleton that Aurelia gives you. Now that the CLI is available I'm trying to port the application over to a VS2015/Asp.net Core project but I'm having some difficulties. In the VSCode project, there's a bundles.js file within the build folder that Gulp uses to compile it (from what I understand). In that file, there's a "dist/aurelia" section and that's where I put all of the extra packages that I need

How to optimize workflow with single project using Aurelia CLI / ASP.NET Core

那年仲夏 提交于 2019-12-07 05:53:52
问题 I have an ASP.NET Core project, which also hosts an Aurelia CLI project, using TypeScript / SASS. The IDE is Visual Studio 2015. When the project is built by Visual Studio or MSBuild, the au build command is executed in the precompilation target, so when I build or run the ASP.NET Core project from Visual Studio using F5, Aurelia CLI will build and bundle the assets for the Aurelia app into wwwroot as well. This workflow ensures that any solution changes are correctly built, and it also