No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Initial commit May 14, 2017
src chore: exclude elasticlunr from transpile Jan 23, 2019
.babelrc chore: preset update Oct 25, 2018
.editorconfig Initial commit May 14, 2017
.eslintrc.json chore: eslint update Oct 25, 2018
.flowconfig Initial commit May 14, 2017
.gitignore chore: removed .vscode dir Dec 7, 2018
.prettierrc.json chore: first try webpack4 Oct 15, 2018
LICENSE docs: add license & readme Sep 30, 2017
README.md docs: add license & readme Sep 30, 2017
package-lock.json 1.2.7 Jan 23, 2019
package.json 1.2.7 Jan 23, 2019

README.md

Dialog Scripts

Build scripts preset for dialog-based web & desktop applications.

Installation

yarn add @dlghq/dialog-scripts

Usage

You can configure your build using dialog.config.js file.

// dialog.config.js

const path = require('path');
const pkg = require('./package.json');

function resolve(...args) {
  return path.resolve(__dirname, ...args);
}

module.exports = {
  // web-app build configuration
  web: {
    root: __dirname,
    output: resolve('dist/web'),
    entry: {
      js: resolve('web/index.js'),
      css: resolve('web/styles/global.css'),
      html: resolve('web/index.html')
    },
    paths: {
      js: resolve('web'),
      styles: resolve('web/styles'),
      cssModules: resolve('web/components'),
      valFiles: [
        resolve('web/messages.js')
      ]
    },
    favicon: resolve('assets/favicon.png'),
    version: pkg.version,
    cssPrefix: 'dlgee',
    environment: process.env.NODE_ENV || 'development',
    override: {
      // override any file from dialog sdk and it's dependencies
      '~/@dlghq/dialog-components/src/components/Logo/Logo': 'web/components/Logo/Logo',
    },
    configureSentry() {
      if (process.env.SENTRY_API_KEY) {
        return {
          apiKey: process.env.SENTRY_API_KEY,
          project: 'my-app'
        };
      }

      return null;
    }
  },
  // desktop-app build configuration
  desktop: {
    root: __dirname,
    main: resolve('desktop/main.js'),
    output: resolve('dist/desktop'),
    version: pkg.version,
    homepage: 'https://my-app.com',
    name: 'my-app',
    productName: 'My App',
    description: 'My App Messenger',
    author: {
      name: 'My Company',
      email: 'support@my-app.com'
    },
    appId: 'com.my-app',
    copyright: 'Copyright © 2017 My Company',
    schema: 'mycompany',
    platforms: ['macos', 'windows', 'deb', 'rpm']
  }
};

License

Apache-2.0