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.

docs(cli): document that scripts and styles can accept objects

See original GitHub issue

πŸ“š Docs or angular.io bug report

Description

https://angular.io/cli/build mentions

Some additional options can only be set through the configuration file, either by direct editing or with the ng config command. These include assets, styles, and scripts objects that provide runtime-global resources to include in the project.

https://angular.io/guide/workspace-config#alternate-build-configurations and https://next.angular.io/guide/workspace-config#additional-build-and-test-options mention

OPTIONS PROPERTIES DESCRIPTION
styles An object containing style files to add to the global context of the project. Angular CLI supports CSS imports and all major CSS preprocessors:Β sass/scss,Β less, andΒ stylus.
scripts An object containing JavaScript script files to add to the global context of the project. The scripts are loaded exactly as if you had added them in aΒ <script>Β tag insideΒ index.html.

But neither cover that they can accept an extraEntryPoint object like: {"input": "src/styles/foo.css", "lazy": true, "bundleName: "foo"} nor how to use the features that these options enable like lazy loading styles.

πŸ”¬ Minimal Reproduction

What’s the affected URL?**

https://angular.io/guide/workspace-config#alternate-build-configurations https://next.angular.io/guide/workspace-config#additional-build-and-test-options

Reproduction Steps**

See Description.

Expected vs Actual Behavior**

Stable features are expected to be documented. Actual: stable features are not documented.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jbogarthydecommented, Jul 2, 2019

Landed in Next, depends on CLI change that isn’t in Stable yet (renamed a parameter that was misleading)

1reaction
alan-agius4commented, Jun 12, 2019

Another missing part similar to the above is the sourceMap and optimization options when they don’t have a boolean value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Document command-line syntax - Google Developers
This page shows how to document command-line commands and their arguments. For more information about formatting code that appears in text,Β ...
Read more >
Tips for using the Azure CLI successfully - Microsoft Learn
Learn tips for using Azure CLI successfully, such as output formats, passing parameter values, and quoting rules for different shells.
Read more >
Using shorthand syntax with the AWS CLI
Use a shorthand syntax for JSON-formatted data that allows simpler representation of your option parameters with the AWS Command Line Interface (AWS CLI)....
Read more >
argparse β€” Parser for command-line options, arguments and ...
Return the populated namespace. Previous calls to add_argument() determine exactly what objects are created and how they are assigned. See the documentation forΒ ......
Read more >
JavaScript object basics - Learn web development | MDN
html file. This contains very little β€” a <script> element for us to write our source code into. We'll use this as a...
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