forked from plusacht/ember-bootstrap-datetimepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
54 lines (43 loc) · 2.4 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* jshint node: true */
'use strict';
var path = require('path');
module.exports = {
name: 'ember-bootstrap-datetimepicker',
included: function(app) {
this._super.included(app);
var bowerDir = app.bowerDirectory;
var bootstrapPath = path.join(bowerDir,'/bootstrap/dist/');
var options = app.options['ember-bootstrap-datetimepicker'] || {};
// Import css theme from bootstrap
if (options.importBootstrapTheme) {
app.import(path.join(bootstrapPath, 'css/bootstrap-theme.css'));
}
// Import css and glyphicons from bootstrap
if (options.importBootstrapCSS) {
app.import(path.join(bootstrapPath, 'css/bootstrap.css'));
app.import(path.join(bootstrapPath, 'css/bootstrap.css.map'), { destDir: 'assets' });
// Import glyphicons
app.import(path.join(bootstrapPath, 'fonts/glyphicons-halflings-regular.eot'), { destDir: '/fonts' });
app.import(path.join(bootstrapPath, 'fonts/glyphicons-halflings-regular.svg'), { destDir: '/fonts' });
app.import(path.join(bootstrapPath, 'fonts/glyphicons-halflings-regular.ttf'), { destDir: '/fonts' });
app.import(path.join(bootstrapPath, 'fonts/glyphicons-halflings-regular.woff'), { destDir: '/fonts' });
app.import(path.join(bootstrapPath, 'fonts/glyphicons-halflings-regular.woff2'), { destDir: '/fonts'});
}
// Import css from bootstrap-datetimepicker
app.import(path.join(bowerDir, '/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css'));
if(options.importFontAwesome) {
app.import(bowerDir + '/font-awesome/css/font-awesome.min.css', { destDir: '/fonts'});
app.import(bowerDir + '/font-awesome/fonts/fontawesome-webfont.woff', { destDir: '/fonts'});
app.import(bowerDir + '/font-awesome/fonts/fontawesome-webfont.woff2', { destDir: '/fonts'});
app.import(bowerDir + '/font-awesome/fonts/fontawesome-webfont.eot', { destDir: '/fonts'});
app.import(bowerDir + '/font-awesome/fonts/fontawesome-webfont.svg', { destDir: '/fonts'});
app.import(bowerDir + '/font-awesome/fonts/fontawesome-webfont.ttf', { destDir: '/fonts'});
}
// Import css from bootstrap
if (options.importBootstrapJS) {
app.import(path.join(bootstrapPath, 'js/bootstrap.js'));
}
// Import js from bootstrap-datetimepicker
app.import(path.join(bowerDir, '/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js'));
}
};