Skip to content

Commit 7a422f0

Browse files
committed
AJAX indicators
1 parent 86300a8 commit 7a422f0

13 files changed

+9660
-68
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v12

Gruntfile.js

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,20 @@ module.exports = function (grunt) {
1919
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
2020
}
2121

22-
var path = require('path')
22+
const path = require('path')
23+
const inliner = require('sass-inline-svg');
24+
const sass = require('node-sass');
25+
const Fiber = require('fibers');
2326

2427
// Project configuration.
25-
grunt.initConfig({
28+
var config = {
2629
// Metadata.
2730
pkg: grunt.file.readJSON('package.json'),
2831
banner: '/*!\n' +
29-
' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
30-
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
31-
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
32-
' */\n',
32+
' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
33+
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
34+
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
35+
' */\n',
3336

3437
// Task configuration.
3538
clean: {
@@ -50,7 +53,7 @@ module.exports = function (grunt) {
5053

5154
watch: {
5255
sass: {
53-
files: 'scss/**/*.scss',
56+
files: ['scss/**/*.scss', 'scss/**/*.svg'],
5457
tasks: ['sass-compile', 'copy:css']
5558
},
5659
},
@@ -62,13 +65,9 @@ module.exports = function (grunt) {
6265
postcss: {
6366
command: 'npm run postcss'
6467
},
65-
"sass": {
66-
command: "node-sass --sass-output-style expanded --source-map true --precision 6 scss/themes/" + THEME + ".scss " +
67-
"dist/css/" + THEME + ".css"
68-
},
69-
'scss-clean': {
68+
'scss-clean': {
7069
command: "cleancss --skip-advanced --source-map --output dist/css/" + THEME + ".min.css dist/css/" + THEME + ".css"
71-
},
70+
},
7271
'scss-lint': {
7372
command: 'npm run scss-lint'
7473
},
@@ -94,15 +93,32 @@ module.exports = function (grunt) {
9493
}
9594
]
9695
}
97-
}
96+
},
9897

99-
})
98+
sass: {
99+
dist: {
100+
options: {
101+
functions: {
102+
"svg": inliner('scss/apnscp/media', {optimize: true, encodingFormat: "uri"})
103+
},
104+
implementation: sass,
105+
sourceMap: true,
106+
fiber: Fiber,
107+
precision: 6,
108+
outputStyle: "expanded"
109+
},
110+
files: {}
111+
},
112+
}
113+
};
114+
config.sass.dist.files["dist/css/" + THEME + ".css"] = "scss/themes/" + THEME + ".scss";
115+
grunt.initConfig(config)
100116

101117
require('jit-grunt')(grunt)
102118
require('time-grunt')(grunt)
103119

104120
grunt.registerTask('test-scss', ['exec:scss-lint'])
105-
grunt.registerTask('sass-compile', ['exec:sass', 'copy:css'])
121+
grunt.registerTask('sass-compile', ['sass', 'copy:css'])
106122
grunt.registerTask('dist-css', ['sass-compile', 'exec:postcss', 'exec:clean-css', 'copy:css'])
107123

108124
// Full distribution task.

0 commit comments

Comments
 (0)