question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Add alternate output option

See original GitHub issue

I’m submitting a feature request

  • Library Version: 0.23.0

Please tell us about your environment:

  • Operating System: Windows 10

  • Language: ESNext

Current behavior: It is currently not possible to change your output directory when running au build.

You are currently unable to change it through editing the build tasks, because the CLI bundler will use the new output path when finding & replacing the script tag src in index.html. It won’t be able to update the vendor-bundle src.

https://github.com/aurelia/cli/blob/master/lib/build/bundle.js#L217

Expected/desired behavior: The ability to specify the output directory for a build, depending on the environment.

We tried with the following snippet inserted in the build.js task, but it was unable to update vendor-bundle in the index file.

import {CLIOptions, build} from 'aurelia-cli';
import project from '../aurelia.json';

if (CLIOptions.hasFlag('output')) {
    project.build.targets[0].output = CLIOptions.getFlagValue('output');
}
  • What is the expected behavior? The command au build --env prod --output export Should output to the directory export

I feel like we should look at changing the way CLI updates the path to vendor-bundle. Maybe the setIndexFileConfigTarget part should be a task that the developer can edit themselves?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jwxcommented, Jun 26, 2017

@CasiOo If there are ideas behind targetS (as in more than one) I couldn’t find anything in the code (which only uses targets[0]). The au build should now however work with anything after --env so it would be possible to build web, cordova or electron with this. (Or even cordova-dev, electron-prod and so on.)

Furthermore, aurelia.json seems to currently only support one platform per project. I think there’s more to do if we’re to have true multi platform projects. And that might also include a --platform flag for the build command, making it, for example, au build --platform cordova --env dev --watch for multi platform projects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature request: fig.alt as a chunk option · Issue #1867 - GitHub
This is a feature request for knitr to add this chunk option. ... Hi, I'm trying out this feature and I can't get...
Read more >
7 Useful Tips to Manage Feature Requests - Craft.io
Feature requests can provide product managers with great ideas for product improvement, but they must be managed correctly. Here are our top tips....
Read more >
Feature request tracking: 3 strategies to do it better
Option 1: Track feature requests manually · Try setting aside a time slot every day to deal with feature requests. · If the...
Read more >
Feature Requests: How to Collect Them and Engage Users in ...
Feature requests are an important window into your customers desires and priorities. Here's how to make the most of them, and handle the ......
Read more >
Feature request response email templates - LiveAgent
Saying 'yes' to feature requests ... Hi [Name],. Thank you for taking the time to contact us. There's no way to do that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found