entreprise7pro-bootstrap-sass 3.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.travis.yml +19 -0
  4. data/CHANGELOG.md +233 -0
  5. data/CONTRIBUTING.md +86 -0
  6. data/Gemfile +7 -0
  7. data/LICENSE +22 -0
  8. data/README.md +376 -0
  9. data/Rakefile +98 -0
  10. data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  11. data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
  12. data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  13. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  14. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  15. data/assets/images/.keep +0 -0
  16. data/assets/javascripts/bootstrap/affix.js +166 -0
  17. data/assets/javascripts/bootstrap/alert.js +97 -0
  18. data/assets/javascripts/bootstrap/button.js +136 -0
  19. data/assets/javascripts/bootstrap/carousel.js +248 -0
  20. data/assets/javascripts/bootstrap/collapse.js +214 -0
  21. data/assets/javascripts/bootstrap/dropdown.js +167 -0
  22. data/assets/javascripts/bootstrap/modal.js +356 -0
  23. data/assets/javascripts/bootstrap/popover.js +123 -0
  24. data/assets/javascripts/bootstrap/scrollspy.js +174 -0
  25. data/assets/javascripts/bootstrap/tab.js +157 -0
  26. data/assets/javascripts/bootstrap/tooltip.js +679 -0
  27. data/assets/javascripts/bootstrap/transition.js +61 -0
  28. data/assets/javascripts/bootstrap-sprockets.js +12 -0
  29. data/assets/javascripts/bootstrap.js +2611 -0
  30. data/assets/javascripts/bootstrap.min.js +7 -0
  31. data/assets/javascripts/jquery.min.js +2 -0
  32. data/assets/stylesheets/_bootstrap-compass.scss +9 -0
  33. data/assets/stylesheets/_bootstrap-mincer.scss +19 -0
  34. data/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
  35. data/assets/stylesheets/_bootstrap.scss +56 -0
  36. data/assets/stylesheets/bootstrap/_alerts.scss +73 -0
  37. data/assets/stylesheets/bootstrap/_badges.scss +68 -0
  38. data/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
  39. data/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
  40. data/assets/stylesheets/bootstrap/_buttons.scss +168 -0
  41. data/assets/stylesheets/bootstrap/_carousel.scss +263 -0
  42. data/assets/stylesheets/bootstrap/_close.scss +37 -0
  43. data/assets/stylesheets/bootstrap/_code.scss +70 -0
  44. data/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
  45. data/assets/stylesheets/bootstrap/_dropdowns.scss +212 -0
  46. data/assets/stylesheets/bootstrap/_forms.scss +602 -0
  47. data/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
  48. data/assets/stylesheets/bootstrap/_grid.scss +94 -0
  49. data/assets/stylesheets/bootstrap/_input-groups.scss +166 -0
  50. data/assets/stylesheets/bootstrap/_jumbotron.scss +55 -0
  51. data/assets/stylesheets/bootstrap/_labels.scss +66 -0
  52. data/assets/stylesheets/bootstrap/_list-group.scss +128 -0
  53. data/assets/stylesheets/bootstrap/_media.scss +66 -0
  54. data/assets/stylesheets/bootstrap/_mixins.scss +39 -0
  55. data/assets/stylesheets/bootstrap/_modals.scss +150 -0
  56. data/assets/stylesheets/bootstrap/_navbar.scss +657 -0
  57. data/assets/stylesheets/bootstrap/_navs.scss +242 -0
  58. data/assets/stylesheets/bootstrap/_normalize.scss +422 -0
  59. data/assets/stylesheets/bootstrap/_pager.scss +54 -0
  60. data/assets/stylesheets/bootstrap/_pagination.scss +86 -0
  61. data/assets/stylesheets/bootstrap/_panels.scss +271 -0
  62. data/assets/stylesheets/bootstrap/_popovers.scss +126 -0
  63. data/assets/stylesheets/bootstrap/_print.scss +99 -0
  64. data/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
  65. data/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
  66. data/assets/stylesheets/bootstrap/_responsive-utilities.scss +157 -0
  67. data/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
  68. data/assets/stylesheets/bootstrap/_tables.scss +233 -0
  69. data/assets/stylesheets/bootstrap/_theme.scss +293 -0
  70. data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
  71. data/assets/stylesheets/bootstrap/_tooltip.scss +112 -0
  72. data/assets/stylesheets/bootstrap/_type.scss +299 -0
  73. data/assets/stylesheets/bootstrap/_utilities.scss +55 -0
  74. data/assets/stylesheets/bootstrap/_variables.scss +875 -0
  75. data/assets/stylesheets/bootstrap/_wells.scss +29 -0
  76. data/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
  77. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
  78. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  79. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +61 -0
  80. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  81. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  82. data/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
  83. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +50 -0
  84. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +82 -0
  85. data/assets/stylesheets/bootstrap/mixins/_grid.scss +123 -0
  86. data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  87. data/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
  88. data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  89. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
  90. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +11 -0
  91. data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +10 -0
  92. data/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
  93. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
  94. data/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
  95. data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
  96. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  97. data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  98. data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
  99. data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
  100. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  101. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  102. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
  103. data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  104. data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +210 -0
  105. data/bower.json +38 -0
  106. data/composer.json +21 -0
  107. data/entreprise7pro-bootstrap-sass.gemspec +37 -0
  108. data/eyeglass-exports.js +7 -0
  109. data/lib/entreprise7pro-bootstrap-sass/engine.rb +17 -0
  110. data/lib/entreprise7pro-bootstrap-sass/version.rb +4 -0
  111. data/lib/entreprise7pro-bootstrap-sass.rb +91 -0
  112. data/package-lock.json +1011 -0
  113. data/package.json +48 -0
  114. data/sache.json +5 -0
  115. data/tasks/bower.rake +31 -0
  116. data/tasks/converter/char_string_scanner.rb +38 -0
  117. data/tasks/converter/fonts_conversion.rb +16 -0
  118. data/tasks/converter/js_conversion.rb +47 -0
  119. data/tasks/converter/less_conversion.rb +752 -0
  120. data/tasks/converter/logger.rb +57 -0
  121. data/tasks/converter/network.rb +97 -0
  122. data/tasks/converter.rb +80 -0
  123. data/templates/project/_bootstrap-variables.sass +876 -0
  124. data/templates/project/manifest.rb +20 -0
  125. data/templates/project/styles.sass +6 -0
  126. data/test/compilation_test.rb +30 -0
  127. data/test/dummy_node_mincer/apple-touch-icon-144-precomposed.png +0 -0
  128. data/test/dummy_node_mincer/application.css.ejs.scss +6 -0
  129. data/test/dummy_node_mincer/manifest.js +87 -0
  130. data/test/dummy_rails/README.rdoc +3 -0
  131. data/test/dummy_rails/Rakefile +6 -0
  132. data/test/dummy_rails/app/assets/images/.keep +0 -0
  133. data/test/dummy_rails/app/assets/javascripts/application.js +2 -0
  134. data/test/dummy_rails/app/assets/stylesheets/application.sass +2 -0
  135. data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
  136. data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
  137. data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
  138. data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
  139. data/test/dummy_rails/app/views/pages/root.html.slim +84 -0
  140. data/test/dummy_rails/config/application.rb +31 -0
  141. data/test/dummy_rails/config/boot.rb +5 -0
  142. data/test/dummy_rails/config/environment.rb +5 -0
  143. data/test/dummy_rails/config/environments/development.rb +23 -0
  144. data/test/dummy_rails/config/environments/production.rb +82 -0
  145. data/test/dummy_rails/config/environments/test.rb +38 -0
  146. data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
  147. data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
  148. data/test/dummy_rails/config/initializers/inflections.rb +16 -0
  149. data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
  150. data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
  151. data/test/dummy_rails/config/initializers/session_store.rb +3 -0
  152. data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
  153. data/test/dummy_rails/config/locales/en.yml +3 -0
  154. data/test/dummy_rails/config/locales/es.yml +3 -0
  155. data/test/dummy_rails/config/routes.rb +3 -0
  156. data/test/dummy_rails/config.ru +4 -0
  157. data/test/dummy_rails/log/.keep +0 -0
  158. data/test/dummy_sass_only/Gemfile +4 -0
  159. data/test/dummy_sass_only/compile.rb +20 -0
  160. data/test/dummy_sass_only/import_all.scss +2 -0
  161. data/test/gemfiles/default.gemfile +3 -0
  162. data/test/node_mincer_test.rb +35 -0
  163. data/test/node_sass_compile_test.sh +9 -0
  164. data/test/pages_test.rb +14 -0
  165. data/test/sass_test.rb +29 -0
  166. data/test/sprockets_rails_test.rb +31 -0
  167. data/test/support/dummy_rails_integration.rb +22 -0
  168. data/test/support/reporting.rb +27 -0
  169. data/test/test_helper.rb +36 -0
  170. data/test/test_helper_rails.rb +6 -0
  171. metadata +467 -0
data/README.md ADDED
@@ -0,0 +1,376 @@
1
+ # Bootstrap 3 for Sass
2
+ [![Gem Version](https://badge.fury.io/rb/entreprise7pro-bootstrap-sass.svg)](http://badge.fury.io/rb/entreprise7pro-bootstrap-sass) Ready!
3
+ [![npm version](https://img.shields.io/npm/v/entreprise7pro-bootstrap-sass.svg?style=flat)](https://www.npmjs.com/package/entreprise7pro-bootstrap-sass) Ready!
4
+ [![Build Status](https://img.shields.io/travis/entreprise7pro/bootstrap-sass.svg)](https://travis-ci.org/entreprise7pro/bootstrap-sass) TDB
5
+
6
+ ###Bower instructions
7
+
8
+ `bower install entreprise7pro/bootstrap-sass --save`
9
+
10
+
11
+ `bootstrap-sass` is a Sass-powered version of [Bootstrap](https://github.com/entreprise7pro/bootstrap) 3, ready to drop right into your Sass powered applications.
12
+
13
+ This is Bootstrap **3**. For Bootstrap **4 or 5** see [main repo](https://github.com/twbs/bootstrap).
14
+
15
+ ## Installation
16
+
17
+ Please see the appropriate guide for your environment of choice:
18
+
19
+ * [Ruby on Rails](#a-ruby-on-rails).
20
+ * [Bower](#b-bower).
21
+ * [npm / Node.js](#c-npm--nodejs).
22
+
23
+ ### a. Ruby on Rails
24
+
25
+ `bootstrap-sass` is easy to drop into Rails with the asset pipeline.
26
+
27
+ In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default.
28
+
29
+ ```ruby
30
+ gem 'bootstrap-sass', '~> 3.4.2'
31
+ gem 'sassc-rails', '>= 2.1.0'
32
+ ```
33
+
34
+ `bundle install` and restart your server to make the files available through the pipeline.
35
+
36
+ Import Bootstrap styles in `app/assets/stylesheets/application.scss`:
37
+
38
+ ```scss
39
+ // "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
40
+ @import "bootstrap-sprockets";
41
+ @import "entreprise7pro-bootstrap";
42
+ ```
43
+
44
+ `bootstrap-sprockets` must be imported before `bootstrap` for the icon fonts to work.
45
+
46
+ Make sure the file has `.scss` extension (or `.sass` for Sass syntax). If you have just generated a new Rails app,
47
+ it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so rename it:
48
+
49
+ ```console
50
+ $ mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss
51
+ ```
52
+
53
+ Then, remove all the `*= require_self` and `*= require_tree .` statements from the sass file. Instead, use `@import` to import Sass files.
54
+
55
+ Do not use `*= require` in Sass or your other stylesheets will not be [able to access][antirequire] the Bootstrap mixins or variables.
56
+
57
+ Bootstrap JavaScript depends on jQuery.
58
+ If you're using Rails 5.1+, add the `jquery-rails` gem to your Gemfile:
59
+
60
+ ```ruby
61
+ gem 'jquery-rails'
62
+ ```
63
+
64
+ ```console
65
+ $ bundle install
66
+ ```
67
+
68
+ Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
69
+
70
+ ```js
71
+ //= require jquery
72
+ //= require bootstrap-sprockets
73
+ ```
74
+
75
+ `bootstrap-sprockets` and `bootstrap` [should not both be included](https://github.com/twbs/bootstrap-sass/issues/829#issuecomment-75153827) in `application.js`.
76
+
77
+ `bootstrap-sprockets` provides individual Bootstrap Javascript files (`alert.js` or `dropdown.js`, for example), while
78
+ `bootstrap` provides a concatenated file containing all Bootstrap Javascripts.
79
+
80
+ #### Bower with Rails
81
+
82
+ When using [bootstrap-sass Bower package](#c-bower) instead of the gem in Rails, configure assets in `config/application.rb`:
83
+
84
+ ```ruby
85
+ # Bower asset paths
86
+ root.join('vendor', 'assets', 'bower_components').to_s.tap do |bower_path|
87
+ config.sass.load_paths << bower_path
88
+ config.assets.paths << bower_path
89
+ end
90
+ # Precompile Bootstrap fonts
91
+ config.assets.precompile << %r(bootstrap-sass/assets/fonts/bootstrap/[\w-]+\.(?:eot|svg|ttf|woff2?)$)
92
+ # Minimum Sass number precision required by bootstrap-sass
93
+ ::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
94
+ ```
95
+
96
+ Replace Bootstrap `@import` statements in `application.scss` with:
97
+
98
+ ```scss
99
+ $icon-font-path: "bootstrap-sass/assets/fonts/bootstrap/";
100
+ @import "entreprise7pro-bootstrap-sass/assets/stylesheets/bootstrap-sprockets";
101
+ @import "entreprise7pro-bootstrap-sass/assets/stylesheets/bootstrap";
102
+ ```
103
+
104
+ Replace Bootstrap `require` directive in `application.js` with:
105
+
106
+ ```js
107
+ //= require bootstrap-sass/assets/javascripts/bootstrap-sprockets
108
+ ```
109
+
110
+ #### Rails 4.x
111
+
112
+ Please make sure `sprockets-rails` is at least v2.1.4.
113
+
114
+ #### Rails 3.2.x
115
+
116
+ bootstrap-sass is no longer compatible with Rails 3. The latest version of bootstrap-sass compatible with Rails 3.2 is v3.1.1.0.
117
+
118
+ ### b. Bower
119
+
120
+ bootstrap-sass Bower package is compatible with node-sass 3.2.0+. You can install it with:
121
+
122
+ ```console
123
+ $ bower install bootstrap-sass
124
+ ```
125
+
126
+ Sass, JS, and all other assets are located at [assets](/assets).
127
+
128
+ By default, `bower.json` main field list only the main `_bootstrap.scss` and all the static assets (fonts and JS).
129
+ This is compatible by default with asset managers such as [wiredep](https://github.com/taptapship/wiredep).
130
+
131
+ #### Node.js Mincer
132
+
133
+ If you use [mincer][mincer] with node-sass, import Bootstrap like so:
134
+
135
+ In `application.css.ejs.scss` (NB **.css.ejs.scss**):
136
+
137
+ ```scss
138
+ // Import mincer asset paths helper integration
139
+ @import "bootstrap-mincer";
140
+ @import "entreprise7pro-bootstrap";
141
+ ```
142
+
143
+ In `application.js`:
144
+
145
+ ```js
146
+ //= require bootstrap-sprockets
147
+ ```
148
+
149
+ See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer.
150
+
151
+ ### c. npm / Node.js
152
+ ```console
153
+ $ npm install bootstrap-sass
154
+ ```
155
+
156
+
157
+ ## Configuration
158
+
159
+ ### Sass
160
+
161
+ By default all of Bootstrap is imported.
162
+
163
+ You can also import components explicitly. To start with a full list of modules copy
164
+ [`_bootstrap.scss`](assets/stylesheets/_bootstrap.scss) file into your assets as `_bootstrap-custom.scss`.
165
+ Then comment out components you do not want from `_bootstrap-custom`.
166
+ In the application Sass file, replace `@import 'bootstrap'` with:
167
+
168
+ ```scss
169
+ @import 'bootstrap-custom';
170
+ ```
171
+
172
+ ### Sass: Number Precision
173
+
174
+ bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 8 (default is 5).
175
+
176
+ Precision is set for Ruby automatically when using the `sassc-rails` gem.
177
+ When using the npm or Bower version with Ruby, you can set it with:
178
+
179
+ ```ruby
180
+ ::Sass::Script::Value::Number.precision = [8, ::Sass::Script::Value::Number.precision].max
181
+ ```
182
+
183
+ ### Sass: Autoprefixer
184
+
185
+ Bootstrap requires the use of [Autoprefixer][autoprefixer].
186
+ [Autoprefixer][autoprefixer] adds vendor prefixes to CSS rules using values from [Can I Use](https://caniuse.com/).
187
+
188
+ To match [upstream Bootstrap's level of browser compatibility](https://getbootstrap.com/getting-started/#support), set Autoprefixer's `browsers` option to:
189
+ ```json
190
+ [
191
+ "Android 2.3",
192
+ "Android >= 4",
193
+ "Chrome >= 20",
194
+ "Firefox >= 24",
195
+ "Explorer >= 8",
196
+ "iOS >= 6",
197
+ "Opera >= 12",
198
+ "Safari >= 6"
199
+ ]
200
+ ```
201
+
202
+ ### JavaScript
203
+
204
+ [`assets/javascripts/bootstrap.js`](/assets/javascripts/bootstrap.js) contains all of Bootstrap's JavaScript,
205
+ concatenated in the [correct order](/assets/javascripts/bootstrap-sprockets.js).
206
+
207
+
208
+ #### JavaScript with Sprockets or Mincer
209
+
210
+ If you use Sprockets or Mincer, you can require `bootstrap-sprockets` instead to load the individual modules:
211
+
212
+ ```js
213
+ // Load all Bootstrap JavaScript
214
+ //= require bootstrap-sprockets
215
+ ```
216
+
217
+ You can also load individual modules, provided you also require any dependencies.
218
+ You can check dependencies in the [Bootstrap JS documentation][jsdocs].
219
+
220
+ ```js
221
+ //= require bootstrap/scrollspy
222
+ //= require bootstrap/modal
223
+ //= require bootstrap/dropdown
224
+ ```
225
+
226
+ ### Fonts
227
+
228
+ The fonts are referenced as:
229
+
230
+ ```scss
231
+ "#{$icon-font-path}#{$icon-font-name}.eot"
232
+ ```
233
+
234
+ `$icon-font-path` defaults to `bootstrap/` if asset path helpers are used, and `../fonts/bootstrap/` otherwise.
235
+
236
+ When using bootstrap-sass with Compass, Sprockets, or Mincer, you **must** import the relevant path helpers before Bootstrap itself, for example:
237
+
238
+ ```scss
239
+ @import "bootstrap-compass";
240
+ @import "entreprise7pro-bootstrap";
241
+ ```
242
+
243
+ ## Usage
244
+
245
+ ### Sass
246
+
247
+ Import Bootstrap into a Sass file (for example, `application.scss`) to get all of Bootstrap's styles, mixins and variables!
248
+
249
+ ```scss
250
+ @import "entreprise7pro-bootstrap";
251
+ ```
252
+
253
+ You can also include optional Bootstrap theme:
254
+
255
+ ```scss
256
+ @import "entreprise7pro-bootstrap/theme";
257
+ ```
258
+
259
+ The full list of Bootstrap variables can be found [here](https://getbootstrap.com/customize/#less-variables). You can override these by simply redefining the variable before the `@import` directive, e.g.:
260
+
261
+ ```scss
262
+ $navbar-default-bg: #312312;
263
+ $light-orange: #ff8c00;
264
+ $navbar-default-color: $light-orange;
265
+
266
+ @import "entreprise7pro-bootstrap";
267
+ ```
268
+
269
+ ### Eyeglass
270
+
271
+ Bootstrap is available as an [Eyeglass](https://github.com/sass-eyeglass/eyeglass) module. After installing Bootstrap via NPM you can import the Bootstrap library via:
272
+
273
+ ```scss
274
+ @import "entreprise7pro-bootstrap-sass/bootstrap"
275
+ ```
276
+
277
+ or import only the parts of Bootstrap you need:
278
+
279
+ ```scss
280
+ @import "entreprise7pro-bootstrap-sass/bootstrap/variables";
281
+ @import "entreprise7pro-bootstrap-sass/bootstrap/mixins";
282
+ @import "entreprise7pro-bootstrap-sass/bootstrap/carousel";
283
+ ```
284
+
285
+ ## Version
286
+
287
+ Bootstrap for Sass version may differ from the upstream version in the last number, known as
288
+ [PATCH](https://semver.org/spec/v2.0.0.html). The patch version may be ahead of the corresponding upstream minor.
289
+ This happens when we need to release Sass-specific changes.
290
+
291
+ Before v3.3.2, Bootstrap for Sass version used to reflect the upstream version, with an additional number for
292
+ Sass-specific changes. This was changed due to Bower and npm compatibility issues.
293
+
294
+ The upstream versions vs the Bootstrap for Sass versions are:
295
+
296
+ | Upstream | Sass |
297
+ |---------:|--------:|
298
+ | 3.3.4+ | same |
299
+ | 3.3.2 | 3.3.3 |
300
+ | <= 3.3.1 | 3.3.1.x |
301
+
302
+ Always refer to [CHANGELOG.md](/CHANGELOG.md) when upgrading.
303
+
304
+ ---
305
+
306
+ ## Development and Contributing
307
+
308
+ If you'd like to help with the development of bootstrap-sass itself, read this section.
309
+
310
+ ### Upstream Converter
311
+
312
+ Keeping bootstrap-sass in sync with upstream changes from Bootstrap used to be an error prone and time consuming manual process. With Bootstrap 3 we have introduced a converter that automates this.
313
+
314
+ **Note: if you're just looking to *use* Bootstrap 3, see the [installation](#installation) section above.**
315
+
316
+ Upstream changes to the Bootstrap project can now be pulled in using the `convert` rake task.
317
+
318
+ Here's an example run that would pull down the master branch from the main [entreprise7pro/bootstrap](https://github.com/entreprise7pro/bootstrap) repo:
319
+
320
+ rake convert
321
+
322
+ This will convert the latest LESS to Sass and update to the latest JS.
323
+ To convert a specific branch or version, pass the branch name or the commit hash as the first task argument:
324
+
325
+ rake convert[e8a1df5f060bf7e6631554648e0abde150aedbe4]
326
+
327
+ The latest converter script is located [here][converter] and does the following:
328
+
329
+ * Converts upstream Bootstrap LESS files to its matching SCSS file.
330
+ * Copies all upstream JavaScript into `assets/javascripts/bootstrap`, a Sprockets manifest at `assets/javascripts/bootstrap-sprockets.js`, and a concatenation at `assets/javascripts/bootstrap.js`.
331
+ * Copies all upstream font files into `assets/fonts/bootstrap`.
332
+ * Sets `Bootstrap::BOOTSTRAP_SHA` in [version.rb][version] to the branch sha.
333
+
334
+ This converter fully converts original LESS to SCSS. Conversion is automatic but requires instructions for certain transformations (see converter output).
335
+ Please submit GitHub issues tagged with `conversion`.
336
+
337
+ ## Maintenance of this build.
338
+
339
+ ## Compiling bootstrap-sass
340
+
341
+ * npm install
342
+ * sudo apt install libyaml-dev
343
+ * bundle config set path 'vendor/bundle'
344
+ * bundle install
345
+
346
+ ## Credits
347
+
348
+ Current contributors:
349
+
350
+ * [Stephen Mulvihill](https://drupal.org/u/smulvih2)
351
+ * [Joseph Olstad](https://drupal.org/u/josepholstad)
352
+
353
+ Former contributors:
354
+
355
+ <!-- feel free to make these link wherever you wish -->
356
+ * [Thomas McDonald](https://x.com/thomasmcdonald_)
357
+ * [Tristan Harward](http://www.trisweb.com)
358
+ * Peter Gumeson
359
+ * [Gleb Mazovetskiy](https://github.com/glebm)
360
+
361
+ and a [significant number of other contributors][contrib].
362
+
363
+ ## You're in good company
364
+ bootstrap-sass is used to build some awesome projects all over the web, including
365
+ [Diaspora](https://diasporafoundation.org/), [rails_admin](https://github.com/sferik/rails_admin),
366
+ Michael Hartl's [Rails Tutorial](https://www.railstutorial.org/), [gitlabhq](http://gitlabhq.com/) and
367
+ [kandan](http://getkandan.com/).
368
+
369
+ [converter]: https://github.com/entreprise7pro/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb
370
+ [version]: https://github.com/entreprise7pro/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb
371
+ [contrib]: https://github.com/entreprise7pro/bootstrap-sass/graphs/contributors
372
+ [antirequire]: https://github.com/entreprise7pro/bootstrap-sass/issues/79#issuecomment-4428595
373
+ [jsdocs]: https://getbootstrap.com/javascript/#transitions
374
+ [sass-precision]: http://sass-lang.com/documentation/Sass/Script/Value/Number.html#precision%3D-class_method
375
+ [mincer]: https://github.com/nodeca/mincer
376
+ [autoprefixer]: https://github.com/postcss/autoprefixer
data/Rakefile ADDED
@@ -0,0 +1,98 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ lib_path = File.join(__dir__, 'lib')
4
+ $:.unshift(lib_path) unless $:.include?(lib_path)
5
+
6
+ load './tasks/bower.rake'
7
+
8
+ require 'rake/testtask'
9
+ Rake::TestTask.new do |t|
10
+ t.libs << 'test'
11
+ t.test_files = FileList['test/**/*_test.rb']
12
+ t.verbose = true
13
+ end
14
+
15
+ desc 'Test all Gemfiles from test/*.gemfile'
16
+ task :test_all_gemfiles do
17
+ require 'term/ansicolor'
18
+ require 'pty'
19
+ require 'shellwords'
20
+ cmd = 'bundle install --quiet && bundle exec rake --trace'
21
+ statuses = Dir.glob('./test/gemfiles/*{[!.lock]}').map do |gemfile|
22
+ env = {'BUNDLE_GEMFILE' => gemfile}
23
+ cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})"
24
+ $stderr.puts Term::ANSIColor.cyan("Testing\n#{cmd_with_env}")
25
+ PTY.spawn(env, cmd) do |r, _w, pid|
26
+ begin
27
+ r.each_line { |l| puts l }
28
+ rescue Errno::EIO
29
+ # Errno:EIO error means that the process has finished giving output.
30
+ ensure
31
+ ::Process.wait pid
32
+ end
33
+ end
34
+ [$? && $?.exitstatus == 0, cmd_with_env]
35
+ end
36
+ failed_cmds = statuses.reject(&:first).map { |(_status, cmd_with_env)| cmd_with_env }
37
+ if failed_cmds.empty?
38
+ $stderr.puts Term::ANSIColor.green('Tests pass with all gemfiles')
39
+ else
40
+ $stderr.puts Term::ANSIColor.red("Failing (#{failed_cmds.size} / #{statuses.size})\n#{failed_cmds * "\n"}")
41
+ exit 1
42
+ end
43
+ end
44
+
45
+ desc 'Dumps output to a CSS file for testing'
46
+ task :debug do
47
+ require 'sassc'
48
+ require 'bootstrap-sass'
49
+ path = Bootstrap.stylesheets_path
50
+ %w(_bootstrap).each do |file|
51
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: ['.', path])
52
+ File.open("tmp/#{file}.css", 'w') { |f| f.write(engine.render) }
53
+ end
54
+ end
55
+
56
+ desc 'Convert bootstrap to bootstrap-sass'
57
+ task :convert, :branch do |t, args|
58
+ require './tasks/converter'
59
+ Converter.new(branch: args[:branch]).process_bootstrap
60
+ end
61
+
62
+ desc 'LESS to stdin -> Sass to stdout'
63
+ task :less_to_scss, :branch do |t, args|
64
+ require './tasks/converter'
65
+ puts Converter.new(branch: args[:branch]).convert_less(STDIN.read)
66
+ end
67
+
68
+ desc 'Compile bootstrap-sass to tmp/ (or first arg)'
69
+ task :compile, :css_path do |t, args|
70
+ require 'sassc'
71
+ require 'bootstrap-sass'
72
+ require 'term/ansicolor'
73
+
74
+ path = 'assets/stylesheets'
75
+ css_path = args.with_defaults(css_path: 'tmp')[:css_path]
76
+ puts Term::ANSIColor.bold "Compiling SCSS in #{path}"
77
+ Dir.mkdir(css_path) unless File.directory?(css_path)
78
+ %w(_bootstrap bootstrap/_theme).each do |file|
79
+ save_path = "#{css_path}/#{file.sub(/(^|\/)?_+/, '\1').sub('/', '-')}.css"
80
+ puts Term::ANSIColor.cyan(" #{save_path}") + '...'
81
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: ['.', path])
82
+ css = engine.render
83
+ File.open(save_path, 'w') { |f| f.write css }
84
+ end
85
+ end
86
+
87
+ desc 'Start a dummy (test) Rails app server'
88
+ task :dummy_rails do
89
+ require 'rack'
90
+ require 'term/ansicolor'
91
+ port = ENV['PORT'] || 9292
92
+ puts %Q(Starting on #{Term::ANSIColor.cyan "http://localhost:#{port}"})
93
+ Rack::Server.start(
94
+ config: 'test/dummy_rails/config.ru',
95
+ Port: port)
96
+ end
97
+
98
+ task default: :test