packages not found in index.html and karma.conf.js after doing wiredep

417 Views Asked by At

I'm using wiredep to automatically include ckeditor and ng-file-upload to my index template and karma.conf.js. My project is bootstrapped by jhipster. For ckeditor package, I have to include two files, ckeditor.js and ckeditor-angularjs.js, but wiredep won't copy these files... (i don't have these files into my index.html and my karma.conf.js).

in my bower.json, i have this declaration (after doing bower install ckeditor-angularjs --save):

"dependencies": {
    "ckeditor-angularjs": "*"
}

My Gruntfile.js :

wiredep: {
    app: {
        src: ['src/main/webapp/index.html'],
        exclude: [
            /angular-i18n/  // localizations are loaded dynamically
        ]
    },
    test: {
        src: 'src/test/javascript/karma.conf.js',
        exclude: [/angular-i18n/, /angular-scenario/],
        ignorePath: /\.\.\/\.\.\//, // remove ../../ from paths of injected javascripts
        devDependencies: true,
        fileTypes: {
            js: {
                block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
                detect: {
                    js: /'(.*\.js)'/gi
                },
                replace: {
                    js: '\'{{filePath}}\','
                }
            }
        }
    }
}

i tested with overrides option in bower.json but it wont work... :

"overrides": {
    "bootstrap": {
        "main": [
            "dist/js/bootstrap.js",
            "dist/css/bootstrap.css",
            "less/bootstrap.less"
        ]
    },
    "ckeditor-angularjs": {
        "main": [
            "./src/main/webapp/bower_components/ckeditor/ckeditor.js",
            "build/ckeditor-angularjs.min.js"
        ]
    },
    "ng-file-upload": {
        "main": "ng-file-upload-all.js"
    }
}

when I do this : grunt wiredep, I have this error :

Warning: Maximum call stack size exceeded Use --force to continue. Aborted due to warnings. 

with --force -v param :

Warning: Error: angular is not installed. Try running `bower install`. Used --force, continuing.
Done, but with warnings.

I don't think that angular package is the problem...

Do you know how can I solve this ? Thanks.

0

There are 0 best solutions below