Skip to content

Import form node_modules into dist folder #140

Closed

Description

@zimexco

Hi! I want to use bootstrap v4 with my project generated by angular-cli, but I can't find a way to import the bootstrap folder downloaded with npm inside dist/vendor .
How can I do?

Thank's

Activity

  1. changed the title [-]Import node_modules into dist folder[/-] [+]Import form node_modules into dist folder[/+] on Jan 13, 2016
  2. EmmanuelDemey commented on Jan 17, 2016

    @EmmanuelDemey
    Contributor

    I think you can not, because the files imported in the vendor directory is hard-coded. Cf this file https://github.com/angular/angular-cli/blob/master/lib/broccoli/angular2-app.js

    Am I wrong ?

    Maybe we can do the same thing as wiredep ? read the main property of each NPM modules, and copy/paste these files in the vendor dir ?

  3. intellix commented on Jan 18, 2016

    @intellix
    Contributor

    If you want to quickly solve this, have this ember-cli-build.js:

    /* global require, module */
    
    var Angular2App = require('angular-cli/lib/broccoli/angular2-app');
    var Funnel = require('broccoli-funnel');
    var mergeTrees = require('broccoli-merge-trees');
    
    module.exports = function(defaults) {
        var app = new Angular2App(defaults);
        var app = app.toTree();
    
        var vendors = new Funnel('node_modules', {
            include: [
                'bootstrap/scss/**/*'
            ],
            destDir: 'vendor'
        });
    
        return mergeTrees([app, vendors], { overwrite: true });
    }
  4. cironunes commented on Jan 31, 2016

    @cironunes
    Member

    Closed by acaaa3e and 2efc9a1

  5. angular-automatic-lock-bot commented on Sep 5, 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.

  6. locked and limited conversation to collaborators on Sep 5, 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