Alan Agius cfe93fbc89 feat(@angular/create): add support for yarn create and npm init
With this change we add support to scaffold  an Angular workspace using `yarn create @angular` and `npm init @angular`. These shortcuts support all of the `ng-new` options.

Closes #10339 and closes #14292
2022-07-12 10:19:23 -07:00

42 lines
924 B
Python

# Copyright Google Inc. All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
licenses(["notice"]) # MIT
ts_library(
name = "create",
package_name = "@angular/create",
srcs = glob(
["**/*.ts"],
exclude = [
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
"node_modules/**",
],
),
deps = [
"//packages/angular/cli:angular-cli",
"@npm//@types/node",
],
)
genrule(
name = "license",
srcs = ["//:LICENSE"],
outs = ["LICENSE"],
cmd = "cp $(execpath //:LICENSE) $@",
)
pkg_npm(
name = "npm_package",
visibility = ["//visibility:public"],
deps = [
":README.md",
":create",
":license",
],
)