Skip to content

how do i get cli to copy random files to dist folder? #2202

Closed

Description

@nmorado

versions: angular-cli: 1.0.0-beta.14
node: 5.10.1

i needed to copy random files into the dist folder. it's not clean from the the documentations how to accomplish the same.

appreciate any help.

thanks in advance.

Activity

  1. kylecordes commented on Sep 18, 2016

    @kylecordes

    This capability was lost a few weeks ago - you and I and others are eagerly hoping for its return. I feel like there is an inevitable opening for such a mechanism to be misused, so it would be great to do without it - but without it, too many projects will be driven away from CLI. Therefore, I hope it returns.)

    (For some use cases you can work around it by copying extra files to "dist" after running ng build; for other that won't work, because that doesn't make the files available at top level URLs during development with ng serve.)

  2. Lightw3ight commented on Sep 19, 2016

    @Lightw3ight

    Im writing a chrome extension in Angular 2 with the cli and chrome extensions need a manifest.json file in the root of the app, so I would really like this feature back as manually copying files sucks! :(

  3. pauldubois777 commented on Sep 21, 2016

    @pauldubois777

    I am on 1.0.0-beta.14

    Look in your angular-cli.json file for "assets" under "apps". The default value is "assets", which represents the name of the folder you need to create under your "src" folder. This folder, and its contents, will be copied to the "dist" folder during "ng build".

    Of course you can change the name of this folder to whatever you want, as long as it matches what is in your angular-cli.json file. IE:
    "assets": "myAssets"

    src -> myAssets

  4. nmorado commented on Sep 21, 2016

    @nmorado
    Author

    This works

  5. Lightw3ight commented on Sep 21, 2016

    @Lightw3ight

    How do you get it to copy a file that exists in the root /src/manifest.json

  6. zompad commented on Oct 9, 2016

    @zompad

    I'm trying to build a PWA and need to move the manifest.json to the root. Currently I am moving this with a shell copy script but would be nice to incorporate this into the ng build process.
    @Lightw3ight - did you find a solution?

  7. filipesilva commented on Oct 10, 2016

    @filipesilva
    Contributor

    On the next release, this should be available: #2570

  8. erscoder commented on Dec 12, 2017

    @erscoder

    write manifest.son in assets, file anuglar-cli.json

    "apps": [ { "root": "src", "outDir": "dist", "assets": [ "assets", "favicon.ico", "manifest.json" ],

  9. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  10. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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