ProtonMail / proton-pack

Command to run a dev-server, build etc. with OpenPGP. On top of webpack.
10 stars 5 forks source link

Proton Pack

Create your application with openpgp and our webpack config.

How to install ?

$ npm i -D github:ProtonMail/proton-pack.git#semver:^1.0.0

Create a new app with openpgp etc.

  1. $ npx proton-pack init If you want to use our boilerplate
  2. $ npm start :popcorn: App available on :8080

Dev env

As for the WebClient you need to have appConfig.json (previously env.json)
A new key exists inside this file now, to add more config

{
    "appConfig": {
        "clientId": "WebMail", // use to identify the application by the API
        "appName": "protonmail", // use to identify the application by the proton react components
        "urlI18n": "", // [mandatory if not protonmail] Url for i18n, ex: settings for protonmail-settings
        "clientType": "", // Custom client type
        "version": "", // Custom version
    }
}

Commands

Create a basic app from our boilerplate with openpgp

Extract translations for the app

Run a dev server available on 8080 by default. You can customize the port via NODE_ENV_PORT

You can also pass custom flags:

Build your app

Print as JSON the current config

How to configure

Create a file proton.config.js at the root of your app.

It's a standard webpack config, nothing custom. It contains our config.

Ex: to have a verbose dev server

module.exports = (webpackConfig) => {
    webpackConfig.devServer.stats = 'normal';
    return webpackConfig;
}