From 684f078e715b69de119b2b51273fe83f326c78a3 Mon Sep 17 00:00:00 2001 From: develar Date: Tue, 9 Jul 2019 21:29:22 +0200 Subject: [PATCH] docs: get rid of gitbook - use mkdocs and material theme --- .gitignore | 4 +- book.json | 38 -------------- docs/en/SUMMARY.md | 16 ------ docs/en/add-ons.md | 54 +++++++++----------- docs/en/books.json | 4 -- docs/en/building.md | 3 +- docs/en/cli-commands.md | 5 +- docs/en/configuration.md | 2 - docs/en/core-concepts.md | 2 - docs/en/dependency-management.md | 6 +-- docs/en/development.md | 18 +++---- docs/en/dll-bundle-splitting.md | 5 +- docs/en/environment-variables.md | 5 +- docs/en/extending-as-a-library.md | 5 +- docs/en/extra.js | 25 ++++++++++ docs/en/{README.md => index.md} | 2 +- docs/en/modifying-webpack-configurations.md | 10 ++-- docs/en/project-structure.md | 2 - docs/en/using-static-assets.md | 5 +- electron-webpack.iml | 1 + mkdocs.yml | 55 +++++++++++++++++++++ netlify.toml | 6 +++ package.json | 4 +- 23 files changed, 134 insertions(+), 143 deletions(-) delete mode 100644 book.json delete mode 100644 docs/en/SUMMARY.md delete mode 100644 docs/en/books.json create mode 100644 docs/en/extra.js rename docs/en/{README.md => index.md} (99%) create mode 100644 mkdocs.yml create mode 100644 netlify.toml diff --git a/.gitignore b/.gitignore index 8790260..7b59211 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,6 @@ _book/ /CHANGELOG.md yarn-error.log -.renderer-index-template.html \ No newline at end of file +.renderer-index-template.html + +/site/ \ No newline at end of file diff --git a/book.json b/book.json deleted file mode 100644 index d6e51c5..0000000 --- a/book.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "root": "./docs/en", - "title": "electron-webpack", - "plugins": ["edit-link", "github", "github-buttons", "analytics"], - "pluginsConfig": { - "edit-link": { - "base": "https://github.com/electron-userland/electron-webpack/tree/master/docs" - }, - "github": { - "url": "https://github.com/electron-userland/electron-webpack" - }, - "github-buttons": { - "repo": "electron-userland/electron-webpack", - "types": [ - "star" - ], - "size": "small" - }, - "analytics": { - "context": [ - { - "vendor": "google", - "token": "UA-104881670-1", - "base": "https" - } - ] - } - }, - "links": { - "sharing": { - "facebook": false, - "twitter": true - } - }, - "structure": { - "readme": "readme.md" - } -} \ No newline at end of file diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md deleted file mode 100644 index 96f4053..0000000 --- a/docs/en/SUMMARY.md +++ /dev/null @@ -1,16 +0,0 @@ -* [Introduction](README.md) -* [Core Concepts](core-concepts.md) -* [Development](development.md) - * [Add-ons](add-ons.md) - * [Configuration](configuration.md) - * [CLI Commands](cli-commands.md) - * [Dll Bundle Splitting](dll-bundle-splitting.md) - * [Environment Variables](environment-variables.md) - * [Extending as a Library](extending-as-a-library.md) - * [Modifying Webpack Configurations](modifying-webpack-configurations.md) - * [Using Static Assets](using-static-assets.md) -* [Project Structure](project-structure.md) -* [Building](building.md) -* [Miscellaneous]() - * [Dependency Management](dependency-management.md) - * [Technical Differences of `electron-compile`](technical-differences-of-electron-compile.md) diff --git a/docs/en/add-ons.md b/docs/en/add-ons.md index c19d827..ad27925 100644 --- a/docs/en/add-ons.md +++ b/docs/en/add-ons.md @@ -1,24 +1,23 @@ -# Add-ons - Although `electron-webpack` is provided as a single module, you can also install add-ons. Add-ons are made available to help setup certain frameworks that may require a lot of extra configuration or dependencies, such as TypeScript or Vue.js. These add-ons are completely optional and may not support all use cases. If you need something more custom, please know that the entirety of `webpack`'s documentation still applies to `electron-webpack` ([more info](./extending-as-a-library.md)). -**Current Add-ons** +Current Add-ons: + * [JavaScript Frameworks](#javascript-frameworks) - * [Vue.js](#vuejs) - * [React JSX](#react-jsx) + * [Vue.js](#vuejs) + * [React JSX](#react-jsx) * [Pre-processors](#pre-processors) - * [ESLint](#eslint) - * [TypeScript](#typescript) - * [Less](#less) - * [Sass/SCSS](#sassscss) - * [EJS](#ejs) - * [Nunjucks](#nunjucks) + * [ESLint](#eslint) + * [TypeScript](#typescript) + * [Less](#less) + * [Sass/SCSS](#sassscss) + * [EJS](#ejs) + * [Nunjucks](#nunjucks) * [UI Libraries](#ui-libraries) - * [iView](#iview) + * [iView](#iview) * [Miscellaneous](#miscellaneous) - * [Build Notifications](#build-notifications) + * [Build Notifications](#build-notifications) --- @@ -27,7 +26,6 @@ These add-ons are completely optional and may not support all use cases. If you ### Vue.js Adds support for Vue component files through the use of `vue-loader`. In addition, `vue-devtools` will also be installed for development purposes. -##### Install ```bash yarn add vue electron-webpack-vue --dev ``` @@ -35,8 +33,7 @@ yarn add vue electron-webpack-vue --dev #### Adding TypeScript support Install the [TypeScript](#typescript) add-on, followed by adding the below file to shim Vue component files. -#### `src/renderer/vue-shims.d.ts` -```ts +```ts tab="src/renderer/vue-shims.d.ts" declare module '*.vue' { import Vue from 'vue' export default Vue @@ -58,13 +55,12 @@ And of course, make sure to let `vue-loader` know you want to use TypeScript in #### Adding ESLint support Install the [ESLint](#eslint) add-on, install `eslint-plugin-html`, and add the following additional configurations. -#### Install `html` plugin to lint Vue component files +Install `html` plugin to lint Vue component files: ```bash yarn add eslint-plugin-html --dev ``` -#### `.eslintrc.js` -```js +```js tab=".eslintrc.js" module.exports = { plugins: [ 'html' @@ -73,7 +69,7 @@ module.exports = { ``` ### React JSX -Add support for compiling JSX files. +Add support for compiling JSX files: ```bash yarn add @babel/preset-react --dev @@ -82,7 +78,7 @@ yarn add @babel/preset-react --dev ### Adding TypeScript support for JSX (`.tsx` files) Install the [TypeScript](#typescript) add-on, followed by extending your `tsconfig.json` to include the jsx compiler option as below: -```json +```json tab="tsconfig.json" { "extends": "./node_modules/electron-webpack/tsconfig-base.json", "compilerOptions": { @@ -104,13 +100,13 @@ All direct dev dependencies `babel-preset-*` and `babel-plugin-*` are automatica ### ESLint Add support for script file linting using `eslint`. Internally uses `eslint`, `eslint-loader`, `eslint-friendly-formatter`, and makes `babel-eslint` available if needed. -##### Install ```bash yarn add electron-webpack-eslint --dev ``` -##### Create `.eslintrc.js` in root directory -```js +Create `.eslintrc.js` in the root directory: + +```js tab=".eslintrc.js" module.exports = { /* your base configuration of choice */ extends: 'eslint:recommended', @@ -132,12 +128,11 @@ module.exports = { ### TypeScript Add support for compiling TypeScript script files. Internally uses both `ts-loader` and `fork-ts-checker-webpack-plugin` to compile `*.ts`. Note that entry files can also use the `*.ts` extension. -##### Install ```bash yarn add typescript electron-webpack-ts --dev ``` -#### Create `tsconfig.json` in root directory +Create `tsconfig.json` in the root directory: ```json { "extends": "./node_modules/electron-webpack/tsconfig-base.json" @@ -147,7 +142,6 @@ yarn add typescript electron-webpack-ts --dev ### Less Add support for compiling Less style files. -##### Install ```bash yarn add less less-loader --dev ``` @@ -155,7 +149,6 @@ yarn add less less-loader --dev ### Sass/SCSS Add support for compiling Sass/SCSS style files. -##### Install ```bash yarn add node-sass sass-loader --dev ``` @@ -163,15 +156,13 @@ yarn add node-sass sass-loader --dev ### EJS Add support for compiling EJS template files. -##### Install ```bash yarn add ejs ejs-html-loader --dev ``` ### Nunjucks -Add support for compiling Nunjucks template files. +Add support for compiling Nunjucks template files: -##### Install ```bash yarn add nunjucks nunjucks-loader --dev ``` @@ -193,7 +184,6 @@ Once you have the [element-ui](https://github.com/ElemeFE/element) installed, `e ### Build Notifications Provide OS-level notifications from `webpack` during development. -##### Install ```bash yarn add webpack-build-notifier --dev ``` diff --git a/docs/en/books.json b/docs/en/books.json deleted file mode 100644 index 600b54e..0000000 --- a/docs/en/books.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "gitbook": ">= 3.2.3", - "root": "" -} \ No newline at end of file diff --git a/docs/en/building.md b/docs/en/building.md index 734bf7b..78c91ab 100644 --- a/docs/en/building.md +++ b/docs/en/building.md @@ -6,7 +6,7 @@ One important thing to understand is that `electron-webpack` is agnostic about t Once you have `electron-webpack` configured for your project, you can simply run the `electron-webpack` command to compile your source code. To make things easier, make use of setting up a script in your `package.json`. -```json +```json tab="package.json" { "scripts": { "compile": "electron-webpack" @@ -22,7 +22,6 @@ Now that `electron-webpack` has created your `webpack` bundle, you can simply im #### Using `electron-builder` -##### Install ```bash yarn add electron-builder --dev ``` diff --git a/docs/en/cli-commands.md b/docs/en/cli-commands.md index d416519..e08acad 100644 --- a/docs/en/cli-commands.md +++ b/docs/en/cli-commands.md @@ -1,5 +1,3 @@ -# CLI Commands - `electron-webpack` comes with a simple CLI to help run your application in development and compile your source code. Here is a general overview of what's available. #### `electron-webpack dev` @@ -16,8 +14,7 @@ Yields quick overview of all CLI features. ### Package Scripts To make things easier, make use of setting up scripts in your `package.json` to use the CLI easier. -##### package.json -```json +```json tab="package.json" { "scripts": { "dev": "electron-webpack dev", diff --git a/docs/en/configuration.md b/docs/en/configuration.md index 6334949..eb40d69 100644 --- a/docs/en/configuration.md +++ b/docs/en/configuration.md @@ -1,5 +1,3 @@ -# Configuration - As cool as `electron-webpack` can be a simple module to cover a majority of your development needs, you can also throw in your own configurations as needed. Please know that when using expected defaults, no configurations are neccessary. Configurations can be applied in `package.json` at `electronWebpack` or in a separate `electron-webpack.(json|json5|yml)`. For the purposes of this documentation, we will use the `package.json` approach and examples will show defaults when applicable. diff --git a/docs/en/core-concepts.md b/docs/en/core-concepts.md index fabc9d7..6413718 100644 --- a/docs/en/core-concepts.md +++ b/docs/en/core-concepts.md @@ -1,5 +1,3 @@ -# Core Concepts - Below is a general overview of what `electron-webpack` aims to solve, and what it isn't. #### `electron-webpack` is a module diff --git a/docs/en/dependency-management.md b/docs/en/dependency-management.md index 7cba88a..b42c717 100644 --- a/docs/en/dependency-management.md +++ b/docs/en/dependency-management.md @@ -1,5 +1,3 @@ -# Dependency Management - When creating `electron` applications, dependency management can be a little different for specific cases. To make sure everybody is on the same page, make sure to take a look at the below documentation. ### Using `yarn` @@ -26,7 +24,7 @@ yarn add electron-builder --dev It may also be worth adding a `package.json` script for this command if you plan on using it often (`yarn rebuild-deps`). -```json +```json tab="package.json" { "scripts": { "rebuild-deps": "electron-builder install-app-deps" @@ -37,7 +35,7 @@ It may also be worth adding a `package.json` script for this command if you plan If you choose not to use `electron-builder` as your build tool, you can still run the command using `npx` without side affects. ```bash -# Using `npm@^5.2.0` +# using `npm@^5.2.0` npx electron-builder install-app-deps ``` diff --git a/docs/en/development.md b/docs/en/development.md index 9f363ba..46d2999 100644 --- a/docs/en/development.md +++ b/docs/en/development.md @@ -8,10 +8,10 @@ yarn add electron-webpack electron webpack --dev yarn add source-map-support ``` -### Starting in development mode +### Starting in Development Mode By default, `electron-webpack` expects, at minimum, a `main` process entry point in `src/main/index.js` ([more info](./project-structure.md)). Once you have your entry files setup, you can run `electron-webpack dev` to get started. To make things easier, make use of setting up a script in your `package.json` to start your application in development mode. -```json +```json tab="package.json" { "scripts": { "dev": "electron-webpack dev" @@ -39,8 +39,8 @@ yarn dev ### A little note on the *magic* `electron-webpack` may seem like a **magical** module to some from the outside, but let's cover a few topics about what's going on *under the hood*. -##### Hot Module Replacement -Webpack HMR has been setup to support both the `renderer` and `main` process. This allows for faster development ensuring your application is only restarted when neccessary. All you need to do is accept hot updates in your entry files: +#### Hot Module Replacement +Webpack HMR has been setup to support both the `renderer` and `main` process. This allows for faster development ensuring your application is only restarted when necessary. All you need to do is accept hot updates in your entry files: ```js // in main/index.js, renderer/index.js or in both @@ -50,16 +50,14 @@ if (module.hot) { ``` Check out [this article](https://medium.com/@develar/electron-very-fast-developer-workflow-with-webpack-hmr-e2a2e23590ad) for more details on HMR in `electron-webpack` and the official [webpack docs](https://webpack.js.org/api/hot-module-replacement/) for details and options on the HMR API. -##### Bundling for both `renderer` and `main` processes +#### Bundling for both `renderer` and `main` processes `webpack` is already setup to have an entry point for each process. In addition, you can also easily add further entry points to the `main` process when needed. In the other cases where you just need support for the `main` process, you can even skip the `renderer` process when needed ([more info](./configuration.md#source-directories)). -##### Use of `html-webpack-plugin` +#### Use of `html-webpack-plugin` You might notice that you don't need an `index.html` to get started on your application. That's because it is created for you, as it adds in a few extra configurations needed for the `electron` environment. If you are creating an `electron` application with `webpack`, you are most likely creating a Single Page Application anyways. So because of that, there is already a `
` provided in the markup that you can mount your application onto. ---- - -#### A Note for Windows Users +### A Note for Windows Users If you run into errors while installing dependencies, related to `node-gyp`, then you most likely do not have the proper build tools installed on your system. Build tools include items like Python and Visual Studio. -You can quickly install these build tools by globally installing [`windows-build-tools`](https://github.com/felixrieseberg/windows-build-tools). It provides many items like Visuall C++ packages, Python, and much more. +You can quickly install these build tools by globally installing [`windows-build-tools`](https://github.com/felixrieseberg/windows-build-tools). It provides many items like Visual C++ packages, Python, and much more. diff --git a/docs/en/dll-bundle-splitting.md b/docs/en/dll-bundle-splitting.md index 57ba68f..c237736 100644 --- a/docs/en/dll-bundle-splitting.md +++ b/docs/en/dll-bundle-splitting.md @@ -1,5 +1,3 @@ -# Dll Bundle Splitting - One great feature of using `webpack` is being able to take advantage of the `webpack.DllPlugin` plugin. If you are unfamiliar with the `webpack.DllPlugin` plugin, make sure to read its [documentation](https://webpack.js.org/plugins/dll-plugin/) to better understand what problem it attempts to solve. In short, this can be used to [drastically improve](https://robertknight.github.io/posts/webpack-dll-plugins/) build time performance. Through custom configurations `electron-webpack` provides a place to define specific packages you would like to create a separate bundle for. You can treat this feature as a way to bundle all of your *vendor* libraries together. @@ -46,8 +44,7 @@ Please know that the `vendor` bundle is only created when you explicity run `ele #### Using a `postinstall` hook One common practice when using Dll bundle splitting to define a `postinstall` command to create the `vendor` bundle whenever new dependecies are installed. This can help ensure everything is up to date so you don't have to manually run this yourself. -##### package.json -```json +```json tab="package.json" { "scripts": { "postinstall": "electron-webpack dll" diff --git a/docs/en/environment-variables.md b/docs/en/environment-variables.md index d800f72..e855b87 100644 --- a/docs/en/environment-variables.md +++ b/docs/en/environment-variables.md @@ -1,5 +1,3 @@ -# Environment Variables - Sometimes you need your `webpack` build to be dependent upon specific environment variables. Whether you need to set a global API Url or even the application name, here's how you can set variables that `electron-webpack` will provide for your application. ### `ELECTRON_WEBPACK_APP_*` @@ -48,7 +46,6 @@ set ELECTRON_ARGS=["--inspect-brk=9229"]&&yarn dev Since `electron-webpack` uses the [dotenv](https://www.npmjs.com/package/dotenv) library under the hood, instead of wrestling with CLI arguments, escaping and differences between Windows and Unix systems, you can instead create an `.env` file and specify environment variables: -```bash -# file .env.development +```bash tab=".env.development" ELECTRON_ARGS=["--inspect-brk=9229"] ``` diff --git a/docs/en/extending-as-a-library.md b/docs/en/extending-as-a-library.md index ac6a2e7..969967b 100644 --- a/docs/en/extending-as-a-library.md +++ b/docs/en/extending-as-a-library.md @@ -1,5 +1,3 @@ -# Extending as a Library - One of the great benefits of using `electron-webpack` is that the entirity of `webpack`'s documentation still applies. You can easily skip using the provided CLI and modify the configurations to meet your needs. Since `electron` uses a multi-process architecture, there are also multiple `webpack` configurations. Let's cover what's provided. ### Configuration Files @@ -32,8 +30,7 @@ Let's say we need to support `*.txt` files in our `renderer` process and want to yarn add -D raw-loader ``` -##### myCustomWebpack.renderer.config.js -```js +```js tab="myCustomWebpack.renderer.config.js" const webpackRenderer = require('electron-webpack/webpack.renderer.config.js') module.exports = env => { diff --git a/docs/en/extra.js b/docs/en/extra.js new file mode 100644 index 0000000..dd9c877 --- /dev/null +++ b/docs/en/extra.js @@ -0,0 +1,25 @@ +"use strict" + +// document.addEventListener("DOMContentLoaded", () => { + loadNavPane() +// }) + +function loadNavPane() { + let nav = document.getElementsByClassName("md-nav") + for (let i = 0; i < nav.length; i++) { + const item = nav.item(i) + if (typeof item.style === "undefined") { + continue; + } + + if (item.getAttribute("data-md-level") && item.getAttribute("data-md-component")) { + item.style.display = 'block' + item.style.overflow = 'visible' + } + } + + nav = document.getElementsByClassName("md-nav__toggle") + for (let i = 0; i < nav.length; i++) { + nav.item(i).checked = true; + } +} \ No newline at end of file diff --git a/docs/en/README.md b/docs/en/index.md similarity index 99% rename from docs/en/README.md rename to docs/en/index.md index 53f9eb8..e0cacbd 100644 --- a/docs/en/README.md +++ b/docs/en/index.md @@ -9,7 +9,7 @@ Modern web development practices today require a lot of setup with things like ` If you've been in the JavaScript world for even a short period of time, you are very aware that things are always changing, and development setup is no exclusion. Putting all development scripts into a single **updatable** module just makes sense. Sure a full featured boilerplate works too, but doing also involves needing to manually update those pesky `webpack` configuration files that some may call *magic* when something new comes out. -Here are some of the awesome features you'll find using `electron-webpack`... +Here are some of the awesome features you'll find using `electron-webpack`: * Detailed [documentation](https://webpack.electron.build) * Use of [`webpack`](https://webpack.js.org/) for source code bundling diff --git a/docs/en/modifying-webpack-configurations.md b/docs/en/modifying-webpack-configurations.md index 7b139bd..1f874c0 100644 --- a/docs/en/modifying-webpack-configurations.md +++ b/docs/en/modifying-webpack-configurations.md @@ -1,5 +1,3 @@ -# Modifying Webpack Configurations - Another great benefit of using `electron-wepback` is that you are never restricted to an abstracted API. Of course there isn't a configuration that fits everybody's need, and `electron-webpack` is aware of that. Custom modifications can be made for the `renderer`, `renderer-dll`, and `main` processes. @@ -44,8 +42,7 @@ See [Configuration](configuration.md) for more information. #### Configure `raw-loader` -```js -/* webpack.renderer.additions.js */ +```js tab="webpack.renderer.additions.js" module.exports = { module: { rules: [ @@ -76,7 +73,7 @@ You may modify the default object using any method you like, for example you cou ### Use Case -Let's say you would like the `css-loader` to treat everything as [CSS modules](https://github.com/webpack-contrib/css-loader#modules) and implicitly convert all classnames to hashed variants, unless you defined them as `:global` explicitly. +Let's say you would like the `css-loader` to treat everything as [CSS modules](https://github.com/webpack-contrib/css-loader#modules) and implicitly convert all class names to hashed variants, unless you defined them as `:global` explicitly. First, configure `electron-webpack` to use your custom config file. @@ -95,8 +92,7 @@ See [Configuration](configuration.md) for more information. Next, provide your custom configuration file: -```js -/* webpack.renderer.js */ +```js tab="webpack.renderer.js" module.exports = function(config) { const styleRules = config.module.rules.filter(rule => rule.test.toString().match(/css|less|s\(\[ac\]\)ss/) diff --git a/docs/en/project-structure.md b/docs/en/project-structure.md index e7433f7..0da4a4b 100644 --- a/docs/en/project-structure.md +++ b/docs/en/project-structure.md @@ -1,5 +1,3 @@ -# Project Structure - Everybody likes to structure their projects differently, and `electron-webpack` is aware of that. For the most part, the only configurations needed are [entry points](https://webpack.js.org/concepts/entry-points/) for `webpack` to step in. If you are looking to follow common electron practices or wanting an example template, make sure to check out [`electron-webpack-quick-start`](https://github.com/electron-userland/electron-webpack-quick-start). It has the bare minimun setup, but can be easily modified to meet many needs. The use of this template, of course, is optional. diff --git a/docs/en/using-static-assets.md b/docs/en/using-static-assets.md index c39cee2..612600c 100644 --- a/docs/en/using-static-assets.md +++ b/docs/en/using-static-assets.md @@ -1,5 +1,3 @@ -# Using Static Assets - When using `webpack` to bundle all of our assets together we lose the ability to provide a full path to our assets. This is especially important when we need to use modules like `fs` or those that require a file path to an asset. `electron-webpack` is aware of that issue and provides a solution. You may have noticed in [Project Structure](./project-structure.md) there is a directory specifically for static assets (`static/`). It is here where we can put assets we explicity don't want `webpack` to bundle. So now how can we access their path? @@ -12,8 +10,7 @@ Similar to how `__dirname` can provide you with a path to the parent directory n Let's say we have a static Text file (`foobar.txt`) we need to read into our application using `fs`. Here's how we can use the `__static` variable to get a reliable path to our asset. -##### static/foobar.txt -```txt +```txt tab="static/foobar.txt" foobarbizzbuzz ``` diff --git a/electron-webpack.iml b/electron-webpack.iml index e222c86..c7148cf 100644 --- a/electron-webpack.iml +++ b/electron-webpack.iml @@ -6,6 +6,7 @@ + diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..5d79eb4 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,55 @@ +site_name: electron-webpack +use_directory_urls: false +theme: + name: material + logo: + icon: 'build' + palette: + primary: 'blue' + accent: 'blue' + +docs_dir: docs/en + +repo_name: electron-userland/electron-webpack +repo_url: 'https://github.com/electron-userland/electron-webpack' +edit_uri: "" +dev_addr: 0.0.0.0:8000 +strict: true + +extra_javascript: + - extra.js + +markdown_extensions: + - admonition + - smarty + - pymdownx.smartsymbols + - pymdownx.details + - pymdownx.inlinehilite + - pymdownx.superfences + - markdown_include.include: + base_path: docs/en + - toc: + permalink: true + +google_analytics: + - 'UA-104881670-1' + - webpack.electron.build + +nav: + - Introduction: index.md + - Core Concepts: core-concepts.md + - Development: + - Development: development.md + - Add-ons: add-ons.md + - Configuration: configuration.md + - CLI Commands: cli-commands.md + - Dll Bundle Splitting: dll-bundle-splitting.md + - Environment Variables: environment-variables.md + - Extending as a Library: extending-as-a-library.md + - Modifying Webpack Configurations: modifying-webpack-configurations.md + - Using Static Assets: using-static-assets.md + - Project Structure: project-structure.md + - Building: building.md + - Miscellaneous: + - Dependency Management: dependency-management.md + - Technical Differences of electron-compile: technical-differences-of-electron-compile.md \ No newline at end of file diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..7c6030f --- /dev/null +++ b/netlify.toml @@ -0,0 +1,6 @@ +[Settings] + ID = "905ec7c5-2006-493e-ac00-d2d81b0bcc56" + +[Build] + Publish = "" + Functions = "" diff --git a/package.json b/package.json index 7645421..5b12d60 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "lint": "tslint -c ./node_modules/electron-builder-tslint-config/tslint.json -p packages/electron-webpack --exclude '**/*.js'", "release": "BABEL_ENV=production yarn compile && ./npm-publish.sh && conventional-changelog -p angular -i CHANGELOG.md -s", "test": "yarn compile && yarn lint && jest", - "docs": "rm -rf _book && gitbook && ./docs/publish.sh", - "serve-docs": "gitbook && http-server _book -c-1", + "serve-docs": "mkdocs serve", + "deploy-docs": "mkdocs build --clean && netlifyctl deploy --publish-directory site", "schema": "ts-json-schema-generator --path 'packages/electron-webpack/src/**/*.ts' --no-top-ref --no-type-check --type ElectronWebpackConfiguration --expose export > packages/electron-webpack/scheme.json", "//": "update-deps task intended only for core maintainers", "update-deps": "npm-check-updates -u && lerna exec -- npm-check-updates -u"