Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
956064ec
Commit
956064ec
authored
Jan 19, 2014
by
Zlatan Vasović
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve grunt config and vars
parent
7e145a13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
Gruntfile.js
Gruntfile.js
+21
-21
No files found.
Gruntfile.js
View file @
956064ec
...
@@ -10,11 +10,11 @@ module.exports = function (grunt) {
...
@@ -10,11 +10,11 @@ module.exports = function (grunt) {
return
string
.
replace
(
/
[
-
\\
^$*+?.()|[
\]
{}
]
/g
,
'
\\
$&
'
);
return
string
.
replace
(
/
[
-
\\
^$*+?.()|[
\]
{}
]
/g
,
'
\\
$&
'
);
};
};
var
BsLessdocParser
=
require
(
'
./docs/grunt/bs-lessdoc-parser.js
'
);
var
fs
=
require
(
'
fs
'
);
var
fs
=
require
(
'
fs
'
);
var
path
=
require
(
'
path
'
);
var
generateGlyphiconsData
=
require
(
'
./docs/grunt/bs-glyphicons-data-generator.js
'
);
var
generateGlyphiconsData
=
require
(
'
./docs/grunt/bs-glyphicons-data-generator.js
'
);
var
BsLessdocParser
=
require
(
'
./docs/grunt/bs-lessdoc-parser.js
'
);
var
generateRawFilesJs
=
require
(
'
./docs/grunt/bs-raw-files-generator.js
'
);
var
generateRawFilesJs
=
require
(
'
./docs/grunt/bs-raw-files-generator.js
'
);
var
path
=
require
(
'
path
'
);
// Project configuration.
// Project configuration.
grunt
.
initConfig
({
grunt
.
initConfig
({
...
@@ -36,7 +36,7 @@ module.exports = function (grunt) {
...
@@ -36,7 +36,7 @@ module.exports = function (grunt) {
// Task configuration.
// Task configuration.
clean
:
{
clean
:
{
dist
:
[
'
dist
'
]
dist
:
'
dist
'
},
},
jshint
:
{
jshint
:
{
...
@@ -47,16 +47,16 @@ module.exports = function (grunt) {
...
@@ -47,16 +47,16 @@ module.exports = function (grunt) {
src
:
'
Gruntfile.js
'
src
:
'
Gruntfile.js
'
},
},
src
:
{
src
:
{
src
:
[
'
js/*.js
'
]
src
:
'
js/*.js
'
},
},
test
:
{
test
:
{
src
:
[
'
js/tests/unit/*.js
'
]
src
:
'
js/tests/unit/*.js
'
},
},
assets
:
{
assets
:
{
src
:
[
'
docs/assets/js/application.js
'
,
'
docs/assets/js/customizer.js
'
]
src
:
[
'
docs/assets/js/application.js
'
,
'
docs/assets/js/customizer.js
'
]
},
},
docsGrunt
:
{
docsGrunt
:
{
src
:
[
'
docs/grunt/*.js
'
]
src
:
'
docs/grunt/*.js
'
}
}
},
},
...
@@ -65,19 +65,19 @@ module.exports = function (grunt) {
...
@@ -65,19 +65,19 @@ module.exports = function (grunt) {
config
:
'
js/.jscs.json
'
,
config
:
'
js/.jscs.json
'
,
},
},
gruntfile
:
{
gruntfile
:
{
src
:
[
'
Gruntfile.js
'
]
src
:
'
Gruntfile.js
'
},
},
src
:
{
src
:
{
src
:
[
'
js/*.js
'
]
src
:
'
js/*.js
'
},
},
test
:
{
test
:
{
src
:
[
'
js/tests/unit/*.js
'
]
src
:
'
js/tests/unit/*.js
'
},
},
assets
:
{
assets
:
{
src
:
[
'
docs/assets/js/application.js
'
,
'
docs/assets/js/customizer.js
'
]
src
:
[
'
docs/assets/js/application.js
'
,
'
docs/assets/js/customizer.js
'
]
},
},
docsGrunt
:
{
docsGrunt
:
{
src
:
[
'
docs/grunt/*.js
'
]
src
:
'
docs/grunt/*.js
'
}
}
},
},
...
@@ -122,7 +122,7 @@ module.exports = function (grunt) {
...
@@ -122,7 +122,7 @@ module.exports = function (grunt) {
banner
:
'
<%= banner %>
'
,
banner
:
'
<%= banner %>
'
,
report
:
'
min
'
report
:
'
min
'
},
},
src
:
[
'
<%= concat.bootstrap.dest %>
'
]
,
src
:
'
<%= concat.bootstrap.dest %>
'
,
dest
:
'
dist/js/<%= pkg.name %>.min.js
'
dest
:
'
dist/js/<%= pkg.name %>.min.js
'
},
},
customize
:
{
customize
:
{
...
@@ -195,7 +195,7 @@ module.exports = function (grunt) {
...
@@ -195,7 +195,7 @@ module.exports = function (grunt) {
compress
:
{
compress
:
{
options
:
{
options
:
{
keepSpecialComments
:
'
*
'
,
keepSpecialComments
:
'
*
'
,
noAdvanced
:
true
,
// turn advanced optimizations off until
it'
s fixed in clean-css
noAdvanced
:
true
,
// turn advanced optimizations off until
the issue i
s fixed in clean-css
report
:
'
min
'
,
report
:
'
min
'
,
selectorsMergeMode
:
'
ie8
'
selectorsMergeMode
:
'
ie8
'
},
},
...
@@ -230,8 +230,8 @@ module.exports = function (grunt) {
...
@@ -230,8 +230,8 @@ module.exports = function (grunt) {
config
:
'
less/.csscomb.json
'
config
:
'
less/.csscomb.json
'
},
},
files
:
{
files
:
{
'
dist/css/<%= pkg.name %>.css
'
:
[
'
dist/css/<%= pkg.name %>.css
'
]
,
'
dist/css/<%= pkg.name %>.css
'
:
'
dist/css/<%= pkg.name %>.css
'
,
'
dist/css/<%= pkg.name %>-theme.css
'
:
[
'
dist/css/<%= pkg.name %>-theme.css
'
]
'
dist/css/<%= pkg.name %>-theme.css
'
:
'
dist/css/<%= pkg.name %>-theme.css
'
}
}
}
}
},
},
...
@@ -239,7 +239,7 @@ module.exports = function (grunt) {
...
@@ -239,7 +239,7 @@ module.exports = function (grunt) {
copy
:
{
copy
:
{
fonts
:
{
fonts
:
{
expand
:
true
,
expand
:
true
,
src
:
[
'
fonts/*
'
]
,
src
:
'
fonts/*
'
,
dest
:
'
dist/
'
dest
:
'
dist/
'
},
},
docs
:
{
docs
:
{
...
@@ -258,7 +258,7 @@ module.exports = function (grunt) {
...
@@ -258,7 +258,7 @@ module.exports = function (grunt) {
options
:
{
options
:
{
inject
:
'
js/tests/unit/phantom.js
'
inject
:
'
js/tests/unit/phantom.js
'
},
},
files
:
[
'
js/tests/*.html
'
]
files
:
'
js/tests/*.html
'
},
},
connect
:
{
connect
:
{
...
@@ -303,7 +303,7 @@ module.exports = function (grunt) {
...
@@ -303,7 +303,7 @@ module.exports = function (grunt) {
]
]
},
},
files
:
{
files
:
{
src
:
[
'
_gh_pages/**/*.html
'
]
src
:
'
_gh_pages/**/*.html
'
}
}
},
},
...
@@ -318,7 +318,7 @@ module.exports = function (grunt) {
...
@@ -318,7 +318,7 @@ module.exports = function (grunt) {
},
},
less
:
{
less
:
{
files
:
'
less/*.less
'
,
files
:
'
less/*.less
'
,
tasks
:
[
'
less
'
]
tasks
:
'
less
'
}
}
},
},
...
@@ -385,7 +385,7 @@ module.exports = function (grunt) {
...
@@ -385,7 +385,7 @@ module.exports = function (grunt) {
grunt
.
registerTask
(
'
dist-css
'
,
[
'
less
'
,
'
cssmin
'
,
'
csscomb
'
,
'
usebanner
'
]);
grunt
.
registerTask
(
'
dist-css
'
,
[
'
less
'
,
'
cssmin
'
,
'
csscomb
'
,
'
usebanner
'
]);
// Docs distribution task.
// Docs distribution task.
grunt
.
registerTask
(
'
dist-docs
'
,
[
'
copy:docs
'
]
);
grunt
.
registerTask
(
'
dist-docs
'
,
'
copy:docs
'
);
// Full distribution task.
// Full distribution task.
grunt
.
registerTask
(
'
dist
'
,
[
'
clean
'
,
'
dist-css
'
,
'
copy:fonts
'
,
'
dist-docs
'
,
'
dist-js
'
]);
grunt
.
registerTask
(
'
dist
'
,
[
'
clean
'
,
'
dist-css
'
,
'
copy:fonts
'
,
'
dist-docs
'
,
'
dist-js
'
]);
...
@@ -396,13 +396,13 @@ module.exports = function (grunt) {
...
@@ -396,13 +396,13 @@ module.exports = function (grunt) {
// Version numbering task.
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// This can be overzealous, so its changes should always be manually reviewed!
// This can be overzealous, so its changes should always be manually reviewed!
grunt
.
registerTask
(
'
change-version-number
'
,
[
'
sed
'
]
);
grunt
.
registerTask
(
'
change-version-number
'
,
'
sed
'
);
grunt
.
registerTask
(
'
build-glyphicons-data
'
,
generateGlyphiconsData
);
grunt
.
registerTask
(
'
build-glyphicons-data
'
,
generateGlyphiconsData
);
// task for building customizer
// task for building customizer
grunt
.
registerTask
(
'
build-customizer
'
,
[
'
build-customizer-vars-form
'
,
'
build-raw-files
'
]);
grunt
.
registerTask
(
'
build-customizer
'
,
[
'
build-customizer-vars-form
'
,
'
build-raw-files
'
]);
grunt
.
registerTask
(
'
build-customizer-vars-form
'
,
[
'
jade
'
]
);
grunt
.
registerTask
(
'
build-customizer-vars-form
'
,
'
jade
'
);
grunt
.
registerTask
(
'
build-raw-files
'
,
'
Add scripts/less files to customizer.
'
,
function
()
{
grunt
.
registerTask
(
'
build-raw-files
'
,
'
Add scripts/less files to customizer.
'
,
function
()
{
var
banner
=
grunt
.
template
.
process
(
'
<%= banner %>
'
);
var
banner
=
grunt
.
template
.
process
(
'
<%= banner %>
'
);
generateRawFilesJs
(
banner
);
generateRawFilesJs
(
banner
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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