7

Basic question about bower and dataTables. I would like to use bower to download the dataTables plugin for bootstrap 3 integration.
(I've already tested the page with the cdn links and everything works... now I'd like to use bower).

Here is the reference page on DataTables site:
https://datatables.net/manual/styling/bootstrap

As you can see these are the cdn links:
http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.css

http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.js

And here is the Github Repository:
https://github.com/DataTables/Plugins/tree/master/integration/bootstrap

NOTE: The root of the github repo contains many plugins; I just want the two files (js and css) for the bootstrap integration.

Igor Carmagna
  • 957
  • 1
  • 10
  • 34

6 Answers6

16

Actually, you can install a package with all DataTables plugins using the following bower command:

bower install datatables-plugins

DataTables Boostrap CSS will be on integration folder.

Khonix
  • 4,128
  • 1
  • 16
  • 15
12

Update: please see this answer.

I came here via Google trying to work out how to install the DataTables Bootstrap integration plugin via Bower, as bower install datatables does not include the repo for DataTables plugins. I found my answer here: the Bootstrap integration plugin for DataTables is only available via CDN or from the DataTables site. No official Bower package exists which includes the integration plugins.

Community
  • 1
  • 1
Blake Mumford
  • 17,201
  • 12
  • 49
  • 67
2

Yes Possible and Here is Offical Page

SOLUTION 1

SHORTCUT replace this file and run bower install DONE!

here is bower.json for datatable

 {
  "name": "Project Name",
  "dependencies": {
    "jquery": "~2.2.0",
    "bootstrap": "~3.3.6",
    "datatables.net-bs": "~1.10.10",
    "datatables-autofill-bootstrap": "datatables.net-autofill-bs#~2.1.0",
    "datatables.net-buttons-bs": "~1.1.1",
    "datatables.net-colreorder-bs": "~1.3.0",
    "datatables.net-fixedcolumns-bs": "~3.2.0",
    "datatables.net-fixedheader-bs": "~3.1.0",
    "datatables.net-keytable-bs": "~2.1.0",
    "datatables.net-responsive-bs": "~2.0.1",
    "datatables.net-scroller-bs": "~1.4.0",
    "datatables.net-select-bs": "~1.1.0"
  }
}

SOLUTION 2:

Datatable itself

bower install --save datatables.net

OPTION

bower install --save datatables.net-dt //datatables
bower install --save datatables.net-bs //Bootstrap  //bs Same for all...
bower install --save datatables.net-zf //Foundation //zf Same for all...
bower install --save datatables.net-jqui //JQUERY //jqui Same for all...

AND EXTENSIONS

AutoFill

bower install --save datatables.net-autofill
bower install --save datatables.net-autofill-dt

Buttons

bower install --save datatables.net-buttons
bower install --save datatables.net-buttons-dt

ColReorder

bower install --save datatables.net-colreorder
bower install --save datatables.net-colreorder-dt

FixedColumns

bower install --save datatables.net-fixedcolumns
bower install --save datatables.net-fixedcolumns-dt

FixedHeader

bower install --save datatables.net-fixedheader
bower install --save datatables.net-fixedheader-dt

KeyTable

bower install --save datatables.net-keytable
bower install --save datatables.net-keytable-dt

Responsive

bower install --save datatables.net-responsive
bower install --save datatables.net-responsive-dt

Scroller

bower install --save datatables.net-scroller
bower install --save datatables.net-scroller-dt

Select

bower install --save datatables.net-select
bower install --save datatables.net-select-dt
ErcanE
  • 1,571
  • 3
  • 19
  • 28
1

Actually when you execute

bower install datatables

you can find the bootstrap js at

/media/js/dataTables.bootstrap.min.js
SoldierCorp
  • 7,610
  • 16
  • 60
  • 100
0

Bower is a great package manager for the Web, but it's not possible to my knowledge to get only two file in repository with it.

With bower you recover the entire github repository. And after you include only the files you wants.

Take place on pc but don't change anything in webapp (in terms of space).

Karim BENHDECH
  • 371
  • 2
  • 9
0

Nowadays, you have the correct bower packages. Don't use the datatables package, but instead use the datatables.net package: bower install datatables.net

You'll see that you have a specific package for each datatables plugin and for each theme framework (bootstrap, etc.) You just have to use the packages prefixed with datatables.net. The packages are from the official Datatables developer.

Checkout the available packages at http://bower.io/search/?q=datatables.net

Paulo Rodrigues
  • 593
  • 14
  • 32