Skip to content

Commit

Permalink
Changed Paranext to Platform.Bible in various places, misc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tjcouch-sil committed Dec 14, 2023
1 parent 66c5764 commit cf4236e
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ module.exports = {

rules: {
// #region From paranext-core root .eslintrc.js
// Some rules are commented out since they have overrides in the
// 'Overrides from paranext-core extension .eslintrc.cjs' section
// Some rules are commented out since they have overrides in following sections

// #region ERB rules

Expand All @@ -25,7 +24,7 @@ module.exports = {

// #endregion

// #region Paranext rules
// #region Platform.Bible rules

// Rules in each section are generally in alphabetical order. However, several
// `@typescript-eslint` rules require disabling the equivalent ESLint rule. So in these cases
Expand Down
2 changes: 1 addition & 1 deletion src/webpack-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #region shared with https://github.com/paranext/paranext-core/blob/main/extensions/src/webpack-env.d.ts
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/src/webpack-env.d.ts

/**
* Modules provided by our webpack configuration
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
// Paranext requires modules to be CommonJS
// Platform.Bible requires modules to be CommonJS
// Running webpack.config.ts also requires CommonJS
// https://webpack.js.org/configuration/configuration-languages/#typescript
"module": "CommonJS",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #region shared with https://github.com/paranext/paranext-core/blob/main/extensions/webpack.config.ts
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/webpack.config.ts

import webpack from 'webpack';
import configWebView from './webpack/webpack.config.web-view';
Expand Down
2 changes: 1 addition & 1 deletion webpack/web-view-resolve-webpack-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #region shared with https://github.com/paranext/paranext-core/blob/main/extensions/webpack/web-view-resolve-webpack-plugin.ts
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/webpack/web-view-resolve-webpack-plugin.ts

import { Resolver } from 'webpack';
import { getWebViewTempPath, webViewTempDir, webViewTsxRegex } from './webpack.util';
Expand Down
6 changes: 3 additions & 3 deletions webpack/webpack.config.base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #region shared with https://github.com/paranext/paranext-core/blob/main/extensions/webpack/webpack.config.base.ts
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/webpack/webpack.config.base.ts

import path from 'path';
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
Expand Down Expand Up @@ -33,10 +33,10 @@ const configBase: webpack.Configuration = {
watchOptions: {
ignored: ['**/node_modules'],
},
// Use require for externals as it is the only type of importing that Paranext supports
// Use require for externals as it is the only type of importing that Platform.Bible supports
// https://webpack.js.org/configuration/externals/#externalstypecommonjs
externalsType: LIBRARY_TYPE,
// Modules that Paranext supplies to extensions https://webpack.js.org/configuration/externals/
// Modules that Platform.Bible supplies to extensions https://webpack.js.org/configuration/externals/
// All other dependencies must be bundled into the extension
externals: [
'react',
Expand Down
4 changes: 2 additions & 2 deletions webpack/webpack.config.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { outputFolder } from './webpack.util';

/** Webpack configuration for building main */
const configMain: webpack.Configuration = merge(configBase, {
// #region shared with https://github.com/paranext/paranext-core/blob/main/extensions/webpack/webpack.config.main.ts
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/webpack/webpack.config.main.ts

// Build for node since Paranext loads this in node https://webpack.js.org/concepts/targets/
// Build for node since Platform.Bible loads this in node https://webpack.js.org/concepts/targets/
target: 'node',
// configuration name
name: 'main',
Expand Down
4 changes: 2 additions & 2 deletions webpack/webpack.config.web-view.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #region shared with https://github.com/paranext/paranext-core/blob/main/extensions/webpack/webpack.config.web-view.ts
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/webpack/webpack.config.web-view.ts

import webpack from 'webpack';
import merge from 'webpack-merge';
Expand All @@ -7,7 +7,7 @@ import { getWebViewEntries } from './webpack.util';

/** Webpack configuration for building webViews */
const configWebView: webpack.Configuration = merge(configBase, {
// Build for web since Paranext loads WebViews in browser https://webpack.js.org/concepts/targets/
// Build for web since Platform.Bible loads WebViews in browser https://webpack.js.org/concepts/targets/
target: 'web',
// configuration name so we can depend on it in main
name: 'webView',
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import webpack from 'webpack';
import path from 'path';
import { glob } from 'glob';

// #region shared with https://github.com/paranext/paranext-core/blob/main/extensions/webpack/webpack.util.ts
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/webpack/webpack.util.ts

/**
* String of what a web view needs to have in its name before the file extension to be considered a
Expand Down

0 comments on commit cf4236e

Please sign in to comment.