Skip to content

Feature request: Initialize a new CLI project without having CLI globally installed #4768

Closed
@kuncevic

Description

@kuncevic

Reason

Due to major breaking changes with each CLI release to be able to initialize a new project without having CLI globally installed so this way we can run multiple projects with different CLI versions on single PC and it is what was the purpose of this PR 761e86f

Current situation

Before beta30 without having CLI globally installed it was possible to create CLI app just like that :

  • npm init -y
  • npm install @angular/cli --save
  • alter package.json by adding "ng":"ng" script section (761e86f)
  • npm run ng -- init

Now it is seams to be it is not longer possible due to this PR #4628

Proposal

How about if you run npm run ng -- new on an empty folder it will create the new CLI app?

Right now it is also not an option because just by having a folder with just node_modules folder and a simple package.json like that:

{
  "name": "expl.beta.32.3",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "ng": "ng"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@angular/cli": "^1.0.0-beta.32.3"
  }
} 

When running npm run ng -- new I am getting an error You cannot use the new command inside an Angular CLI project. which is not quite right because there is no Angular CLI app in my folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions