| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- commit 7c72705bc5418ddf7030b3b50e86b236bd07e1fc
- Author: Torkel Ödegaard <torkel.odegaard@gmail.com>
- Date: Thu Jan 1 15:28:28 2015 +0100
- more work on build process
- diff --git a/src/views/index.html b/src/views/index.html
- index 0cb3e2cd2..d1c5f896f 100644
- --- a/src/views/index.html
- +++ b/src/views/index.html
- @@ -16,8 +16,8 @@
- </script>
-
- <!-- build:js app/app.js -->
- - <script src="public/vendor/require/require.js"></script>
- - <script src="public/app/components/require.backend.js"></script>
- + <script src="/public/vendor/require/require.js"></script>
- + <script src="/public/app/components/require.backend.js"></script>
- <!-- endbuild -->
-
- <script>require(['app'], function (app) { app.boot(); })</script>
- @@ -25,7 +25,7 @@
- </head>
-
- <body ng-cloak ng-controller="GrafanaCtrl">
- - <link rel="stylesheet" href="/public/css/grafana.light.min.css" ng-if="grafana.style === 'light'">
- + <link rel="stylesheet" href="/css/grafana.light.min.css" ng-if="grafana.style === 'light'">
-
- <div class="pro-container" ng-class="{'pro-sidemenu-open': grafana.sidemenu}">
-
- diff --git a/tasks/build_task.js b/tasks/build_task.js
- index 47f460537..e605a54a8 100644
- --- a/tasks/build_task.js
- +++ b/tasks/build_task.js
- @@ -23,6 +23,34 @@ module.exports = function(grunt) {
- //'uglify:dest'
- ]);
-
- + grunt.registerTask('build-post-process', function() {
- + var mode = grunt.config.get('mode');
- + if (mode === 'backend') {
- + grunt.config('copy.dist_to_tmp', {
- + expand: true,
- + cwd: '<%= destDir %>',
- + src: '**/*',
- + dest: '<%= tempDir %>/public/',
- + });
- + grunt.config('copy.backend_bin', {
- + cwd: '../bin',
- + expand: true,
- + src: ['grafana'],
- + options: { mode: true},
- + dest: '<%= tempDir %>'
- + });
- + grunt.config('copy.backend_conf', {
- + cwd: '../',
- + expand: true,
- + src: ['conf/*', '!conf/grafana.dev.ini'],
- + dest: '<%= tempDir %>'
- + });
- + grunt.task.run('copy:dist_to_tmp');
- + grunt.task.run('copy:backend_bin');
- + grunt.task.run('copy:backend_conf');
- + }
- + });
- +
- grunt.registerTask('build:grafanaVersion', function() {
- grunt.config('string-replace.config', {
- files: {
- diff --git a/tasks/distribute_task.js b/tasks/distribute_task.js
- index 7cff5efb8..56b76a4c7 100644
- --- a/tasks/distribute_task.js
- +++ b/tasks/distribute_task.js
- @@ -1,31 +1,11 @@
- module.exports = function(grunt) {
- -
- - // build, then zip and upload to s3
- - grunt.registerTask('distribute', [
- - 'distribute:load_s3_config',
- - 'build',
- - 'compress:zip',
- - 'compress:tgz',
- - 's3:dist',
- - 'clean:temp'
- - ]);
- + "use strict";
-
- // build, then zip and upload to s3
- grunt.registerTask('release', [
- - // 'distribute:load_s3_config',
- 'build',
- 'compress:zip_release',
- 'compress:tgz_release',
- - //'s3:release',
- - //'clean:temp'
- ]);
-
- - // collect the key and secret from the .aws-config.json file, finish configuring the s3 task
- - grunt.registerTask('distribute:load_s3_config', function () {
- - var config = grunt.file.readJSON('.aws-config.json');
- - grunt.config('s3.options', {
- - key: config.key,
- - secret: config.secret
- - });
- - });
- -}
- \ No newline at end of file
- +};
|