Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
0016b508
Commit
0016b508
authored
11 years ago
by
Zlatan Vasović
Browse files
Options
Download
Email Patches
Plain Diff
Merge two fs variable declarations into one
One is enough.
parent
a2aaf80c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Gruntfile.js
+3
-4
Gruntfile.js
with
3 additions
and
4 deletions
+3
-4
Gruntfile.js
+
3
-
4
View file @
0016b508
...
@@ -9,7 +9,10 @@ module.exports = function (grunt) {
...
@@ -9,7 +9,10 @@ module.exports = function (grunt) {
RegExp
.
quote
=
function
(
string
)
{
RegExp
.
quote
=
function
(
string
)
{
return
string
.
replace
(
/
[
-
\\
^$*+?.()|[
\]
{}
]
/g
,
'
\\
$&
'
)
return
string
.
replace
(
/
[
-
\\
^$*+?.()|[
\]
{}
]
/g
,
'
\\
$&
'
)
}
}
var
fs
=
require
(
'
fs
'
)
var
btoa
=
require
(
'
btoa
'
)
var
btoa
=
require
(
'
btoa
'
)
// Project configuration.
// Project configuration.
grunt
.
initConfig
({
grunt
.
initConfig
({
...
@@ -320,8 +323,6 @@ module.exports = function (grunt) {
...
@@ -320,8 +323,6 @@ module.exports = function (grunt) {
grunt
.
registerTask
(
'
change-version-number
'
,
[
'
sed
'
]);
grunt
.
registerTask
(
'
change-version-number
'
,
[
'
sed
'
]);
grunt
.
registerTask
(
'
build-glyphicons-data
'
,
function
()
{
grunt
.
registerTask
(
'
build-glyphicons-data
'
,
function
()
{
var
fs
=
require
(
'
fs
'
)
// Pass encoding, utf8, so `readFileSync` will return a string instead of a
// Pass encoding, utf8, so `readFileSync` will return a string instead of a
// buffer
// buffer
var
glyphiconsFile
=
fs
.
readFileSync
(
'
less/glyphicons.less
'
,
'
utf8
'
)
var
glyphiconsFile
=
fs
.
readFileSync
(
'
less/glyphicons.less
'
,
'
utf8
'
)
...
@@ -347,8 +348,6 @@ module.exports = function (grunt) {
...
@@ -347,8 +348,6 @@ module.exports = function (grunt) {
// task for building customizer
// task for building customizer
grunt
.
registerTask
(
'
build-customizer
'
,
'
Add scripts/less files to customizer.
'
,
function
()
{
grunt
.
registerTask
(
'
build-customizer
'
,
'
Add scripts/less files to customizer.
'
,
function
()
{
var
fs
=
require
(
'
fs
'
)
function
getFiles
(
type
)
{
function
getFiles
(
type
)
{
var
files
=
{}
var
files
=
{}
fs
.
readdirSync
(
type
)
fs
.
readdirSync
(
type
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment