Commit graph

34 commits

Author SHA1 Message Date
Matthieu Riegler
82c8b7ae9e build(docs-infra): replace base64 images for stackblitz by svgs (#48774)
PNG converted to base64 don't work on stackblitz.
As stackblitz does't support binary files for dynamicaly created projects, we now use only svgs.

Fixes: #48773

PR Close #48774
2023-01-24 16:39:28 +00:00
Derek Cormier
ffea372105 build(bazel): update documentation for docs authors
Where possible, preseve the original yarn commands.
2022-11-22 13:51:16 -07:00
Derek Cormier
b4c40c5d55 build(bazel): merge aio/tools/defaults.bzl and tools/defaults.bzl
Detect the correct workspace for the source maps dep.
2022-11-22 13:51:16 -07:00
Derek Cormier
50dee93f35 build(bazel): add aio targets to ci
This is a first pass. There is more work to do on package.json, adding
more test targets under bazel, and revising documentation.
2022-11-22 13:51:16 -07:00
Derek Cormier
07126ae40f build(bazel): fix race conditions in windows aio build
Disables the rules_nodejs linker and adds a custom esm module resolver
2022-11-22 13:51:16 -07:00
Derek Cormier
9a27c4cb50 build(bazel): incrementally build aio example zips and live examples
The existing scripts were amended to work on one example at a time
2022-11-22 13:51:16 -07:00
Derek Cormier
8678550a94 build(bazel): create targets for aio docs tests
This replaces the docs-test npm script
2022-11-22 13:51:16 -07:00
Derek Cormier
9cb9161876 build(bazel): generate aio stackblitz and example zips
Can be served by running bazel run //aio:serve
2022-11-22 13:51:16 -07:00
Marc Wrobel
eca3db5692 docs(docs-infra): fix minor typos in angular.io (#47295) (#47295)
PR Close #47295

PR Close #47295
2022-09-07 10:47:21 -07:00
Tobias Speicher
4ddcf81e61 refactor: replace deprecated String.prototype.substr() (#45397)
.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

PR Close #45397
2022-03-24 11:48:09 -07:00
Pete Bacon Darwin
9759799f63 build(docs-infra): ensure necessary boilerplate files appear in Stackblitz examples (#44085)
The `tsconfig.app.json` and similar were not appearing in the generated Stackblitz examples.

PR Close #44085
2021-11-08 18:12:16 +00:00
Pete Bacon Darwin
b4ecc158de build(docs-infra): remove unused code (#44085)
This import was not being used and so it is redundant and can be removed.

PR Close #44085
2021-11-08 18:12:16 +00:00
Pete Bacon Darwin
8020457ce2 build(docs-infra): target webcontainers for stackblitz "live-example" links (#44041)
This commit changes the Stackblitz live examples to create "webcontainer" projects on Stackblitz.
This approach supports the new Angular v13 packaging formats but webcontainers are not supported on some browers. So this is a temporary solution.

PR Close #44041
2021-11-03 16:19:56 -07:00
dario-piotrowicz
919d7dc233 refactor(docs-infra): remove tslint from cli systemjs examples (#43746)
remove the deprecated tslint from the examples of type systemjs

note: eslint hasn't be applied and linting has been removed entirely
to follow angular's unopinionated view on linting

PR Close #43746
2021-10-11 17:14:30 +00:00
dario-piotrowicz
d2f3f2cad6 refactor(docs-infra): remove tslint from cli examples (#43592)
remove the deprecated tslint from the examples of type cli

note: eslint hasn't be applied and linting has been removed entirely
to follow angular's unopinionated view on linting

PR Close #43592
2021-10-04 16:30:48 -07:00
Renovate Bot
648da4f8b5 build: update dependency globby to v12 (#42921)
PR Close #42921
2021-07-23 10:37:35 -07:00
George Kalpakas
662addb355 build(docs-infra): switch the generate-stackblitz/zips scripts to ESM (#42921)
Switch the JS scripts used for generating StackBlitz projects and zips
from CommonJS to ESM format. This is necessary for upgrading the
`globby` dependency to [version 12.0.0][1] in a subsequent commit.

[1]: https://github.com/sindresorhus/globby/releases/v12.0.0

PR Close #42921
2021-07-23 10:37:35 -07:00
iRealNirmal
e071e3b507 build(docs-infra): fixed i18n broken stackblitz example (#42001)
This commit fixes the broken stackblitz example of i18n.

Closes #41838.

PR Close #42001
2021-05-10 16:11:34 -04:00
George Kalpakas
122c8ba0e3 build(docs-infra): fix StackblitzBuilder after jsdom update (#41725)
In commit c617f1f768, `jsdom` was updated
from v9 to v16. This includes a breaking change that caused
`StackblitzBuilder` to fail to generate the StackBlitz examples.
However, this failure went unnoticed, because `StackblitzBuilder` still
completed successfully after failing to generate the examples. (This has
been fixed in the previous commit.)

This commit updates `StackblitzBuilder` to use the new `jsdom` API.

PR Close #41725
2021-04-22 08:38:20 -07:00
George Kalpakas
5a80bc6eb5 build(docs-infra): exit with an error code if generating StackBlitz examples fails (#41725)
Previously, failing to generate one or more StackBlitz examples would
log the errors but exit the command successfully. This made it easy to
miss such failures.

This commit fixes this by exiting the process with an error code if
generating one or more StackBlitz examples fails.
(In order to be able to see all potential errors, all examples are
attempted to be generated before exiting the process.)

PR Close #41725
2021-04-22 08:38:20 -07:00
Pete Bacon Darwin
03d92f75e6 build(docs-infra): enable Ivy in StackBlitz examples (#40930)
We need to explicitly set the `enableIvy` option in a tsconfig file
to tell StackBlitz not to use ViewEngine.

This commit will generate an appropriate tsconfig.json file in the
example data that is sent to StackBlitz, which matches the Ivy
setting of the AIO project itself.

PR Close #40930
2021-02-26 15:40:44 -08:00
Marcono1234
3e1e5a15ba docs: update links to use HTTPS as protocol (#39718)
PR Close #39718
2020-11-20 12:52:16 -08:00
George Kalpakas
efe0e03fe1 docs(docs-infra): apply the one-sentence-per-line rule to Markdown files in aio/tools/ (#38992)
This commit updates the Markdown files inside the `aio/tools/` directory
to contain one sentence per line in order to be consistent with how
Markdown files are formatted in the rest of the repo.

PR Close #38992
2020-09-30 09:20:00 -04:00
George Kalpakas
c21c46a8e8 fix(docs-infra): include correct dependencies in StackBlitz examples (#36071)
Previously, all StackBlitz examples included the default dependencies
for `cli`-type projects. However, different example types may have
different `package.json` files with different dependencies.
For example, the [boilerplate `package.json`][1] for `elements` examples
includes an extra dependency on `@angular/elements`.

This commit changes `StackblitzBuilder` to use the dependencies that
correspond to each example type.
(NOTE: Manually verified the changes.)

Jira issue: [FW-2002][2]

[1]: https://github.com/angular/angular/blob/05d058622/aio/tools/examples/shared/boilerplate/elements/package.json
[2]: https://angular-team.atlassian.net/browse/FW-2002

PR Close #36071
2020-03-20 13:56:26 -07:00
George Kalpakas
9cc8bd5f7d refactor(docs-infra): clean up stackblitz-builder/builder.js script (#36071)
- Remove unused dependencies.
- Change `var` to `const/let`.
- Change regular functions as callbacks to arrow functions.
- Remove unnecessary intermediate variables.
- Switch from custom `_existsSync()` implementation to built-in
  `fs.existsSync()`.

PR Close #36071
2020-03-20 13:56:26 -07:00
Sonu Kapoor
77c53559d0 build(docs-infra): specify more relevant landing files for StackBlitz projects (#34553)
The StackBlitz API (which we use to generate StackBlitz projects on the
fly, when a user clicks on a live example link in the docs) allows
specifying the file to open in the editor by passing a query param. If
no file is specified, StackBlitz opens a default one.

This commit specifies relevant landing files for some of the examples to
make it easier to engage with the examples more quickly, and to see what
the example is attempting to demonstrate.

Fixes #22357.

PR Close #34553
2020-01-22 13:45:23 -08:00
arturovt
f2800b90b2 docs(docs-infra): fix typos and spelling in the stackblitz-builder/README.md (#34009)
PR Close #34009
2019-11-25 11:39:05 -05:00
Santosh Yadav
40705f3366 docs: include svg files in stackblitz and download examples (#31559)
Fixes #31537

PR Close #31559
2019-07-15 16:48:23 -04:00
Santosh Yadav
876cd603f1 docs(docs-infra): remove deprecated Buffer usage from stackblitz builder (#30369)
Fixes #30364

PR Close #30369
2019-05-31 09:56:22 -07:00
Adam Plumer
a100472b5d build: bump year (#27880)
PR Close #27880
2019-01-11 11:15:59 -08:00
Brandon Roberts
fd9d1888ce build(aio): align stackblitz files with Angular CLI V6 (#23521)
Also cleans up legacy references to `.angular-cli.json`

PR Close #23521
2018-05-02 15:00:57 -07:00
Ward Bell
a7e1f236ff docs: testing guide for CLI (#20697)
- updates tests
- heavy prose revisions
- uses HttpClient (with angular-in-memory-web-api)
- test HeroService using `HttpClientTestingModule`
- scrub away most By.CSS
- fake async observable with `asyncData()`
- extensive Twain work
- different take on retryWhen
- remove app barrels (& systemjs.extras) which troubled plunker/systemjs
- add dummy export const to hero.ts (plunkr/systemjs fails w/o it)
- shrink and re-organize TOC
- add marble testing package and tests
- demonstrate the "no beforeEach()" test coding style
- add section on Http service testing
- prepare for stackblitz
- confirm works in plunker except excluded marble test
- add tests for avoidFile class feature of CodeExampleComponent

PR Close #20697
2018-02-26 13:40:23 -08:00
George Kalpakas
15c2a93f14 build(aio): check for obsolete plnkr.json and missing main files (#20165)
Also, remove `plnkr.json` for `service-worker-getting-started` guide,
since it is not used and ServiceWorker cannot work correctly in
plnkr/stackblitz anyway (e.g. no build step to re-compute hashes).
A zipper might be useful and can be added in a subsequent PR, but it is
currently broken (e.g. no dependency on `@angular/service-worker`).

PR Close #20165
2018-01-23 21:30:27 -08:00
Jesus Rodriguez
1a75934cc0 build(aio): migrate plunker to stackblitz (#20165)
PR Close #20165
2018-01-23 21:30:27 -08:00