conf.js 2.9 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 51 52 53 54
  /**
   * Deployment constants configuration.
   */
  deploy: {
    /**
     * The name of the Docker image with the application.
55
     */
56
    imageName: 'kubernetes/dashboard',
57 58
  },

59 60 61 62 63 64 65
  /**
   * Frontend application constants.
   */
  frontend: {
    /**
     * The name of the root Angular module, i.e., the module that bootstraps the application.
     */
66
    rootModuleName: 'kubernetesDashboard',
67 68
  },

69 70 71 72 73 74 75
  /**
   * 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,
76
    backendSrc: path.join(basePath, 'src/app/backend'),
B
bryk 已提交
77
    backendTest: path.join(basePath, 'src/test/backend'),
78
    backendTmp: path.join(basePath, '.tmp/backend'),
79 80
    bowerComponents: path.join(basePath, 'bower_components'),
    build: path.join(basePath, 'build'),
81
    deploySrc: path.join(basePath, 'src/app/deploy'),
82
    dist: path.join(basePath, 'dist'),
B
bryk 已提交
83
    externs: path.join(basePath, 'src/app/externs'),
84 85
    frontendSrc: path.join(basePath, 'src/app/frontend'),
    frontendTest: path.join(basePath, 'src/test/frontend'),
86
    goWorkspace: path.join(basePath, '.go_workspace'),
87 88
    integrationTest: path.join(basePath, 'src/test/integration'),
    karmaConf: path.join(basePath, 'build/karma.conf.js'),
B
bryk 已提交
89
    nodeModules: path.join(basePath, 'node_modules'),
90
    partials: path.join(basePath, '.tmp/partials'),
B
bryk 已提交
91
    prodTmp: path.join(basePath, '.tmp/prod'),
92 93 94
    protractorConf: path.join(basePath, 'build/protractor.conf.js'),
    serve: path.join(basePath, '.tmp/serve'),
    src: path.join(basePath, 'src'),
95
    tmp: path.join(basePath, '.tmp'),
B
bryk 已提交
96
  },
97
};