conf.js 3.1 KB
Newer Older
B
bryk 已提交
1
// Copyright 2015 Google Inc. All Rights Reserved.
2 3 4 5 6
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
B
bryk 已提交
7
//     http://www.apache.org/licenses/LICENSE-2.0
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview Common configuration constants used in other build/test files.
 */
import path from 'path';


/**
 * Base path for all other paths.
 */
const basePath = path.join(__dirname, '../');


/**
 * Exported configuration object with common constants used in build pipeline.
29
 */
30
export default {
31 32 33 34 35 36 37 38
  /**
   * Backend application constants.
   */
  backend: {
    /**
     * The name of the backend binary.
     */
    binaryName: 'dashboard',
B
bryk 已提交
39 40 41
    /**
     * Name of the main backend package that is used in go build command.
     */
42
    packageName: 'app/backend',
B
bryk 已提交
43 44 45
    /**
     * Name of the test backend package that is used in go test command.
     */
46
    testPackageName: 'test/backend',
47 48 49 50
    /**
     * Port number of the development server started by Gulp.
     */
    devServerPort: 8080,
51 52
  },

53 54 55 56 57 58
  /**
   * Deployment constants configuration.
   */
  deploy: {
    /**
     * The name of the Docker image with the application.
59
     */
60
    imageName: 'kubernetes/dashboard',
61 62
  },

63 64 65 66 67 68 69
  /**
   * Frontend application constants.
   */
  frontend: {
    /**
     * The name of the root Angular module, i.e., the module that bootstraps the application.
     */
70
    rootModuleName: 'kubernetesDashboard',
71 72
  },

73 74 75 76 77 78 79
  /**
   * Absolute paths to known directories, e.g., to source directory.
   */
  paths: {
    app: path.join(basePath, 'src/app'),
    assets: path.join(basePath, 'src/app/assets'),
    base: basePath,
80
    backendSrc: path.join(basePath, 'src/app/backend'),
B
bryk 已提交
81
    backendTest: path.join(basePath, 'src/test/backend'),
82
    backendTmp: path.join(basePath, '.tmp/backend'),
83 84
    bowerComponents: path.join(basePath, 'bower_components'),
    build: path.join(basePath, 'build'),
85
    deploySrc: path.join(basePath, 'src/app/deploy'),
86
    dist: path.join(basePath, 'dist'),
87
    distPublic: path.join(basePath, 'dist/public'),
B
bryk 已提交
88
    externs: path.join(basePath, 'src/app/externs'),
89 90
    frontendSrc: path.join(basePath, 'src/app/frontend'),
    frontendTest: path.join(basePath, 'src/test/frontend'),
91
    goWorkspace: path.join(basePath, '.go_workspace'),
92 93
    integrationTest: path.join(basePath, 'src/test/integration'),
    karmaConf: path.join(basePath, 'build/karma.conf.js'),
94
    kubernetes: path.join(basePath, '.tmp/kubernetes'),
B
bryk 已提交
95
    nodeModules: path.join(basePath, 'node_modules'),
96
    partials: path.join(basePath, '.tmp/partials'),
B
bryk 已提交
97
    prodTmp: path.join(basePath, '.tmp/prod'),
98 99 100
    protractorConf: path.join(basePath, 'build/protractor.conf.js'),
    serve: path.join(basePath, '.tmp/serve'),
    src: path.join(basePath, 'src'),
101
    tmp: path.join(basePath, '.tmp'),
B
bryk 已提交
102
  },
103
};