Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
4c7f5279
Commit
4c7f5279
authored
Nov 15, 2013
by
Rashid Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing build with subfolders
parent
5fc0f394
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
Gruntfile.js
+1
-1
tasks/options/requirejs.js
+14
-5
tasks/options/uglify.js
+1
-1
No files found.
Gruntfile.js
View file @
4c7f5279
...
@@ -22,7 +22,7 @@ module.exports = function (grunt) {
...
@@ -22,7 +22,7 @@ module.exports = function (grunt) {
var
key
=
option
.
replace
(
/
\.
js$/
,
''
);
var
key
=
option
.
replace
(
/
\.
js$/
,
''
);
// If key already exists, extend it. It is your responsibility to avoid naming collisions
// If key already exists, extend it. It is your responsibility to avoid naming collisions
config
[
key
]
=
config
[
key
]
||
{};
config
[
key
]
=
config
[
key
]
||
{};
grunt
.
util
.
_
.
extend
(
config
[
key
],
require
(
path
+
option
)(
config
));
grunt
.
util
.
_
.
extend
(
config
[
key
],
require
(
path
+
option
)(
config
,
grunt
));
});
});
// technically not required
// technically not required
return
config
;
return
config
;
...
...
tasks/options/requirejs.js
View file @
4c7f5279
module
.
exports
=
function
(
config
)
{
module
.
exports
=
function
(
config
,
grunt
)
{
var
_c
=
{
var
_c
=
{
build
:
{
build
:
{
options
:
{
options
:
{
...
@@ -63,15 +63,24 @@ module.exports = function(config) {
...
@@ -63,15 +63,24 @@ module.exports = function(config) {
}
}
];
];
var
fs
=
require
(
'fs'
);
var
panelPath
=
config
.
srcDir
+
'/app/panels'
// create a module for each directory in src/app/panels/
// create a module for each directory in src/app/panels/
require
(
'fs'
)
fs
.
readdirSync
(
panelPath
).
forEach
(
function
(
panelName
)
{
.
readdirSync
(
config
.
srcDir
+
'/app/panels'
)
if
(
!
grunt
.
file
.
exists
(
panelPath
+
'/'
+
panelName
+
'/module.js'
))
{
.
forEach
(
function
(
panelName
)
{
fs
.
readdirSync
(
panelPath
+
"/"
+
panelName
).
forEach
(
function
(
subName
)
{
requireModules
.
push
({
name
:
'panels/'
+
panelName
+
'/'
+
subName
+
'/module'
,
exclude
:
[
'app'
]
});
})
}
else
{
requireModules
.
push
({
requireModules
.
push
({
name
:
'panels/'
+
panelName
+
'/module'
,
name
:
'panels/'
+
panelName
+
'/module'
,
exclude
:
[
'app'
]
exclude
:
[
'app'
]
});
});
});
}
});
// exclude the literal config definition from all modules
// exclude the literal config definition from all modules
requireModules
requireModules
...
...
tasks/options/uglify.js
View file @
4c7f5279
...
@@ -2,7 +2,7 @@ module.exports = function(config) {
...
@@ -2,7 +2,7 @@ module.exports = function(config) {
return
{
return
{
dest
:
{
dest
:
{
expand
:
true
,
expand
:
true
,
src
:
[
'**/*.js'
,
'!config.js'
,
'!app/dashboards/*.js'
],
src
:
[
'**/*.js'
,
'!config.js'
,
'!app/dashboards/*.js'
,
'!app/dashboards/**/*.js'
,
],
dest
:
'<%= destDir %>'
,
dest
:
'<%= destDir %>'
,
cwd
:
'<%= destDir %>'
,
cwd
:
'<%= destDir %>'
,
options
:
{
options
:
{
...
...
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