8000 guess.js not compatible if angular is in nx workspace · Issue #561 · guess-js/guess · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
guess.js not compatible if angular is in nx workspace #561
Open
@ElecTreeFrying

Description

@ElecTreeFrying

Need help on how to use guess.js with angular in nx workspace.

guess-parser/dist/guess-parser/index.js

    var path = ['package.json', '../package.json']
        .map(function (p) { return path_1.join(base, p); })
        .filter(fs_1.existsSync)
        .pop();
    if (!path) {
        throw new Error('Unable to discover the project type');
    }
    var content = JSON.parse(fs_1.readFileSync(path).toString());
    var exists = function (file) { return fs_1.existsSync(path_1.join(base, file)); };
    var d = dep(content);
    var dd = devDep(content);
    var tsconfig = 'tsconfig.app.json';
    var srcTsConfig = path_1.join('src', tsconfig);
    if (dd('@angular/cli') && (exists(srcTsConfig) || exists(tsconfig))) {

This line of code will always return false.
exists(srcTsConfig) || exists(tsconfig)

NX workspace file structure

- apps
--> my-project
----> tsconfig.app.json
- package.json

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

      0