Skip to content

Commit 14c29d2

Browse files
committed
adding dependencies, build with grunt
1 parent 2bb0ec6 commit 14c29d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4826
-397
lines changed

bootstrap-v3/Gruntfile.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const sass = require('node-sass');
2+
const path = require('path');
23

34
module.exports = function(grunt) {
45
grunt.initConfig({
@@ -17,32 +18,32 @@ module.exports = function(grunt) {
1718
options: {
1819
implementation: sass,
1920
banner : '<%= meta.banner %>',
20-
includePaths: ["node_modules"]
21+
includePaths: [path.join(__dirname, 'node_modules')]
2122
},
2223
expanded: {
2324
options: {
2425
outputStyle: 'expanded',
2526
},
26-
src: 'src/scss/<%= meta.filename %>.scss',
27+
src: 'src/scss/main.scss',
2728
dest: 'dist/css/<%= meta.filename %>.css'
2829
},
2930
compressed: {
3031
options: {
3132
outputStyle: 'compressed',
3233
sourceMap: true
3334
},
34-
src: 'src/scss/<%= meta.filename %>.scss',
35+
src: 'src/scss/main.scss',
3536
dest: 'dist/css/<%= meta.filename %>.min.css'
3637
},
3738
},
38-
concat: {
39+
copy: {
3940
js: {
40-
src: 'src/js/<%= meta.filename %>.js',
41-
dest: 'dist/js/<%= meta.filename %>.js'
42-
},
43-
scss: {
44-
src: 'src/scss/_mixin.scss',
45-
dest: 'dist/scss/<%= meta.filename %>.mixin.scss'
41+
files: [
42+
{
43+
src: 'src/js/<%= meta.filename %>.js',
44+
dest: 'dist/js/<%= meta.filename %>.js'
45+
}
46+
]
4647
}
4748
},
4849
uglify: {
@@ -58,19 +59,19 @@ module.exports = function(grunt) {
5859
banner : '<%= meta.banner %>'
5960
},
6061
files: {
61-
src: [ 'dist/css/*.css', 'dist/js/*.js', 'dist/scss/*.scss' ]
62+
src: [ 'dist/css/*.css', 'dist/js/*.js', 'dist/scss/<%= meta.filename %>.scss' ]
6263
}
6364
}
6465
},
6566
clean: ['dist/**']
6667
});
6768

6869
grunt.loadNpmTasks('grunt-sass');
69-
grunt.loadNpmTasks('grunt-contrib-concat');
70+
grunt.loadNpmTasks('grunt-contrib-copy');
7071
grunt.loadNpmTasks('grunt-contrib-uglify');
7172
grunt.loadNpmTasks('grunt-contrib-clean');
7273
grunt.loadNpmTasks('grunt-banner');
7374

74-
grunt.registerTask('build', ['clean', 'sass:expanded', 'sass:compressed', 'concat', 'uglify', 'usebanner']);
75+
grunt.registerTask('build', ['clean', 'sass', 'copy', 'uglify', 'usebanner']);
7576
grunt.registerTask('default', ['build']);
7677
};

bootstrap-v3/dist/css/bootstrap-tooltip-custom-class.min.css.map

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap-v3/dist/scss/bootstrap-tooltip-custom-class.mixin.scss

Lines changed: 0 additions & 39 deletions
This file was deleted.

bootstrap-v3/example.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<title>Bootstrap 3 Tooltip Custom Classes</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77

8-
<link rel='stylesheet' href='node_modules/normalize.css/normalize.css'>
98
<link rel='stylesheet prefetch' href='node_modules/bootstrap/dist/css/bootstrap.min.css'>
109

1110
<link rel='stylesheet' href="dist/css/bootstrap-tooltip-custom-class.min.css">

bootstrap-v3/package-lock.json

Lines changed: 11 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap-v3/package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@
2525
"dependencies": {
2626
"bootstrap": "^3.4.1",
2727
"bootstrap-sass": "^3.4.1",
28-
"jquery": "^3.4.1",
29-
"normalize.css": "^8.0.1"
28+
"jquery": "^3.4.1"
3029
},
3130
"devDependencies": {
3231
"grunt": "^1.0.4",
3332
"grunt-banner": "^0.6.0",
3433
"grunt-contrib-clean": "^2.0.0",
35-
"grunt-contrib-concat": "^1.0.1",
36-
"grunt-contrib-sass": "^1.0.0",
34+
"grunt-contrib-copy": "^1.0.0",
3735
"grunt-contrib-uglify": "^4.0.1",
3836
"grunt-sass": "^3.1.0",
3937
"node-sass": "^4.13.0"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//== Styles for predefined Tooltip Custom Classes
2+
//
3+
//##
4+
.tooltip-primary {
5+
@include tooltip-custom($tooltip-primary-bg, $tooltip-color);
6+
}
7+
8+
.tooltip-success {
9+
@include tooltip-custom($tooltip-success-bg, $tooltip-color);
10+
}
11+
12+
.tooltip-info {
13+
@include tooltip-custom($tooltip-info-bg, $tooltip-color);
14+
}
15+
16+
.tooltip-warning {
17+
@include tooltip-custom($tooltip-warning-bg, $tooltip-color);
18+
}
19+
20+
.tooltip-danger {
21+
@include tooltip-custom($tooltip-danger-bg, $tooltip-color);
22+
}
Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
@import "bootstrap-sass/assets/stylesheets/bootstrap/variables";
2-
31
@import "variables";
42
@import "mixin";
5-
6-
7-
//== Styles for predefined Tooltip Custom Classes
8-
//
9-
//##
10-
.tooltip-primary {
11-
@include tooltip-custom($tooltip-primary-bg, $tooltip-color);
12-
}
13-
14-
.tooltip-success {
15-
@include tooltip-custom($tooltip-success-bg, $tooltip-color);
16-
}
17-
18-
.tooltip-info {
19-
@include tooltip-custom($tooltip-info-bg, $tooltip-color);
20-
}
21-
22-
.tooltip-warning {
23-
@include tooltip-custom($tooltip-warning-bg, $tooltip-color);
24-
}
25-
26-
.tooltip-danger {
27-
@include tooltip-custom($tooltip-danger-bg, $tooltip-color);
28-
}
3+
@import "tooltips";

bootstrap-v3/src/scss/main.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "bootstrap-sass/assets/stylesheets/bootstrap/variables";
2+
@import "bootstrap-tooltip-custom-class";

0 commit comments

Comments
 (0)