Skip to content

Conversation

@intellix
Copy link
Contributor

@intellix intellix commented Aug 9, 2017

We're attempting to re-use common library code within the same CLI codebase. To achieve this we're putting apps in separate folders like:

/coca-cola
    /app
        app.module.ts
    styles.scss
    index.html
/pepsi
    /app
        app.module.ts
    styles.scss
    index.html
/shared
    /components
    /services

index.html has it's own brand specific things, like a unique <title> for instance. This means we need to separate them and point to them using appConfig like:

"index": "coca-cola/index.html",

When you run an ng build though, the index.html is still inside the branded folder, referencing JS that is up a directory. This PR flattens the appConfig.index property, as it should always be in the root directory with the JS files anyway

Fixes: #7309

@grizzm0
Copy link
Contributor

grizzm0 commented Aug 9, 2017

The use in #7309 is wrong as both outDir and index contains the path "dm". Put them together and you get outDir + index = dist/dm/dm/index.html.

See my post here (#7124 (comment)) about how to have multiple apps with shared code. It works just fine. You need to edit outDir and root. Not outDir and index.

@intellix
Copy link
Contributor Author

Closing as it's probably irrelevant by now and eases PR maintenance burden :)

@intellix intellix closed this Dec 11, 2017
@intellix intellix deleted the flat-html-index branch October 25, 2018 20:32
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add optional "input" and "output" paths to "index" in angular-cli.json

4 participants