Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Verse Ref View Extension #1

Merged
merged 43 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d4f5775
Initial commit
tjcouch-sil Dec 4, 2023
902359b
Added multi-extension template based on paranext-core/extensions
tjcouch-sil Dec 13, 2023
13eedab
Changed Paranext to Platform.Bible in various places, misc improvements
tjcouch-sil Dec 14, 2023
cdf4082
Added warning about editing update merge commit history
tjcouch-sil Dec 14, 2023
e1aef4b
Ignored dist and release when formatting extension
tjcouch-sil Dec 14, 2023
0e07afb
Moved Special features description to this repo for lower frequency o…
tjcouch-sil Dec 14, 2023
b304fd7
Moved a lot of git things to consts, made it easier to localize error…
tjcouch-sil Dec 15, 2023
3fa20a8
Removed debug log
tjcouch-sil Dec 15, 2023
56b2862
Added multi-extension template based on paranext-core/extensions (#1)
tjcouch-sil Dec 15, 2023
655ae0e
Fixed a couple things related to packaging extensions
tjcouch-sil Jan 3, 2024
aeca48d
Fixed a couple things related to packaging extensions (#2)
tjcouch-sil Jan 3, 2024
26aea8b
Added 'shared with' statements to various style files and brought the…
tjcouch-sil Jan 4, 2024
6fd7212
Added 'shared with' statements to various style files and brought the…
tjcouch-sil Jan 4, 2024
d5fcc8d
Removed no-non-null-assertion as it is covered by no-type-assertion
tjcouch-sil Jan 5, 2024
79123d5
Removed no-non-null-assertion as it is covered by no-type-assertion (#4)
tjcouch-sil Jan 5, 2024
b5d8fd1
remove papi-components, update packages, add platform-bible-utils as …
Jan 17, 2024
f30019b
Remove papi-components, replace with two libraries (#5)
jolierabideau Jan 17, 2024
a3fa497
Fixed emotion package duplication
tjcouch-sil Jan 19, 2024
c44fb5c
Reworked explanation for package aliases. Also removed note about spl…
tjcouch-sil Jan 22, 2024
4cf4681
Fixed emotion package duplication (#6)
tjcouch-sil Jan 22, 2024
447253b
npm updates (#7)
irahopkinson Jan 26, 2024
46f31d3
Add contributions folder for menus.json (#8)
lyonsil Feb 9, 2024
d954c16
Added copying settings and project settings contribution files
tjcouch-sil Feb 9, 2024
5199295
Fixed git problems with inconsistent error messages
tjcouch-sil Feb 9, 2024
9e171be
Added copying settings and project settings contribution files (#9)
tjcouch-sil Feb 9, 2024
186b4c7
Fixed swc bindings not found error
tjcouch-sil Feb 15, 2024
514575f
Fixed swc bindings not found error (#10)
tjcouch-sil Feb 15, 2024
5de1fe4
security update `@sillsdev/scripture` (#11)
irahopkinson Feb 21, 2024
7da567c
Updated to node 20.11.1 LTS, replaced ts-node with tsx in the necessa…
tjcouch-sil Feb 21, 2024
ed667ec
Updated to node 20.11.1 LTS (#12)
tjcouch-sil Feb 21, 2024
d90ddc6
Fix cjs typo 'csj'
tjcouch-sil Feb 21, 2024
c125b7c
Fix cjs typo 'csj' (#13)
tjcouch-sil Feb 21, 2024
8078ba2
update all npm packages (#14)
irahopkinson Apr 2, 2024
733ea7f
Fixed dts self-import, used npm workspaces to clear up package issues
tjcouch-sil Apr 8, 2024
d1718c2
Updated package-lock.json
tjcouch-sil Apr 8, 2024
19c2966
Fixed dts self-import, used npm workspaces to clear up package issues…
tjcouch-sil Apr 8, 2024
db6da14
Merge remote-tracking branch 'paranext-multi-extension-template/main'
tjcouch-sil Apr 17, 2024
69be58a
Updated from template
tjcouch-sil Apr 17, 2024
b167f0d
Squashed 'src/verse-ref-view/' content from commit 973c0c5
tjcouch-sil Apr 17, 2024
e2add9e
Merge commit 'b167f0d75ffde135a0eea7661b13846921328637' as 'src/verse…
tjcouch-sil Apr 17, 2024
6d75c0e
Formatted verse-ref-view extension
tjcouch-sil Apr 17, 2024
2cdc79b
Added verse ref view functionality
tjcouch-sil Apr 17, 2024
9a0030b
Fixed VerseRefView name
tjcouch-sil Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) <year> <copyright_holder_name>
Copyright (c) 2022-2024 SIL International

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 2 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,6 @@
# paranext-multi-extension-template
# platform-bible-sample-extensions

Template for creating multiple Platform.Bible extensions in one repo

## Template Info

This is a webpack project template pre-configured to build an arbitrary number of Platform.Bible extensions. It contains the bare minimum of what a multi-extension repo needs. Note that many of the files mentioned in [Summary](#summary) are not present in this template because they describe extension code which must be added to this template. For inspiration on what extensions in a multi-extension repo could look like, refer to any repo forked from this template. An example would be the [paranext-sample-extensions]() [MISSING! PLEASE ADD WHEN AVAILABLE].

### Customize repo details

Follow these instructions to customize the template to be your own Platform.Bible extension repo.

#### Install and hook up to the template

To make the process of customizing from the template as smooth as possible, we recommend you do the following before anything else:

- [Install and set up this repo](#to-install)
- [Update this repo from the template](#to-update-this-repo-and-extensions-from-the-templates) to hook everything up for smooth updates in the future

#### Replace placeholders

- At the top of this `README.md`:

- Replace the first line `# paranext-multi-extension-template` with `# your-extension-repo-name`
- Below the first line, replace the repo description with your own description

- In `package.json`:

- Replace `"paranext-multi-extension-template"` with `"your-extension-repo-name"`
- Update ownership information and other relevant fields as desired

- In `LICENSE`:

- Adjust as desired (feel free to choose a different license)
- If you choose to stay with the current license, update the copyright statement

#### Create your first extension in this repo

Follow the steps in [To create a new extension in this repo](#to-create-a-new-extension-in-this-repo) to create your first extension in this repo! You can follow the same steps to create new extensions as desired.

#### Remove Template Info

Once finished customizing this template to be your own, you can remove the [Template Info](#template-info) section and sub-sections of this readme.
Sample extensions for Platform.Bible to demonstrate various capabilities

## Summary

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "paranext-multi-extension-template",
"name": "platform-bible-sample-extensions",
"private": true,
"version": "0.0.1",
"author": "Paranext",
Expand Down
16 changes: 16 additions & 0 deletions src/verse-ref-view/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100

[*.md]
trim_trailing_whitespace = false

[*.cs]
indent_size = 4
35 changes: 35 additions & 0 deletions src/verse-ref-view/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.eslintignore

# Please keep this file in sync with .prettierignore and .stylelintignore

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# OSX
.DS_Store

.idea
npm-debug.log.*
*.css.d.ts
*.sass.d.ts
*.scss.d.ts

# Built files
dist
release
temp-build

# generated files
package-lock.json

# #endregion
163 changes: 163 additions & 0 deletions src/verse-ref-view/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
// #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.eslintrc.cjs

module.exports = {
extends: [
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
'erb',
// Make sure this is last so it gets the chance to override other configs.
// See https://github.com/prettier/eslint-config-prettier and https://github.com/prettier/eslint-plugin-prettier
'plugin:prettier/recommended',
],

rules: {
// Some rules in this following shared region are not applied since they are overridden in subsequent regions
// #region shared with https://github.com/paranext/paranext-core/blob/main/.eslintrc.js except certain overrides

// #region ERB rules

'import/extensions': 'off',
// A temporary hack related to IDE not resolving correct package.json
'import/no-extraneous-dependencies': 'off',
'import/no-import-module-exports': 'off',
'import/no-unresolved': 'error',
'react/jsx-filename-extension': 'off',
'react/react-in-jsx-scope': 'off',

// #endregion

// #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
// each ESLint rule is turned off immediately above the corresponding `@typescript-eslint` rule.
'import/no-anonymous-default-export': ['error', { allowCallExpression: false }],
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
'lines-between-class-members': 'off',
'@typescript-eslint/lines-between-class-members': [
'error',
'always',
{ exceptAfterSingleLine: true, exceptAfterOverload: true },
],
'@typescript-eslint/member-ordering': 'error',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': [
'error',
{
allow: ['arrowFunctions', 'functions', 'methods'],
},
],
'@typescript-eslint/no-explicit-any': 'error',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': 'error',
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['shared/*', 'renderer/*', 'extension-host/*', 'node/*', 'client/*', 'main/*'],
message: `Importing from this path is not allowed. Try importing from @papi/core. Imports from paths like 'shared', 'renderer', 'node', 'client' and 'main' are not allowed to prevent unnecessary import break.`,
},
],
},
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, allowNamedExports: true, typedefs: false, ignoreTypeReferences: true },
],
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'comma-dangle': ['error', 'always-multiline'],
indent: 'off',
'jsx-a11y/label-has-associated-control': [
'error',
{
assert: 'either',
},
],
// Should use our logger anytime you want logs that persist. Otherwise use console only in testing
'no-console': 'warn',
'no-null/no-null': 2,
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-type-assertion/no-type-assertion': 'error',
'prettier/prettier': ['warn', { tabWidth: 2, trailingComma: 'all' }],
'react/jsx-indent-props': ['warn', 2],
'react/jsx-props-no-spreading': ['error', { custom: 'ignore' }],
'react/require-default-props': 'off',

// #endregion

// #endregion

// #region Overrides to rules from paranext-core

'import/no-unresolved': ['error', { ignore: ['@papi'] }],

// #endregion
},
globals: {
globalThis: 'readonly',
},
overrides: [
{
// Allow this file to have overrides to rules from paranext-core
files: ['.eslintrc.*js'],
rules: {
'no-dupe-keys': 'off',
},
},
{
files: ['*.js'],
rules: {
strict: 'off',
},
},
{
// Don't require extensions to have a default export for "activate()"
files: ['*.ts'],
rules: {
'import/prefer-default-export': 'off',
},
},
{
files: ['./lib/*', './webpack/*'],
rules: {
// These files are scripts not running in Platform.Bible, so they can't use the logger
'no-console': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
// Allow .d.ts files to self import so they can refer to their types in `papi-shared-types`
'import/no-self-import': 'off',
},
},
],
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.lint.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
plugins: ['@typescript-eslint', 'no-type-assertion', 'no-null'],
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
};

// #endregion
33 changes: 33 additions & 0 deletions src/verse-ref-view/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.gitignore

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
release
dist-ssr
*.local

# formatting and linting
.eslintcache

# Editor directories and files
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Temporary intermediate build files
temp-build

# #endregion
35 changes: 35 additions & 0 deletions src/verse-ref-view/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# #region shared with https://github.com/paranext/paranext-multi-extension-template/blob/main/.prettierignore

# Please keep this file in sync with .eslintignore and .stylelintignore

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

# OSX
.DS_Store

.idea
npm-debug.log.*
*.css.d.ts
*.sass.d.ts
*.scss.d.ts

# Built files
dist
release
temp-build

# generated files
package-lock.json

# #endregion
19 changes: 19 additions & 0 deletions src/verse-ref-view/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// #region shared with https://github.com/paranext/paranext-core/blob/main/.prettierrc.js and https://github.com/paranext/paranext-multi-extension-template/blob/main/.prettierrc.js

module.exports = {
tabWidth: 2,
trailingComma: 'all',
endOfLine: 'lf',
singleQuote: true,
// prettier-plugin-jsdoc options
tsdoc: true,
plugins: ['prettier-plugin-jsdoc'],
overrides: [
{
files: '*.json',
options: { parser: 'json' },
},
],
};

// #endregion
Loading