fix: icons package
This commit is contained in:
@@ -1 +0,0 @@
|
||||
14.17.3
|
||||
@@ -6,7 +6,7 @@ module.exports = function (api) {
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
electron: 9,
|
||||
electron: 17,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"@svgr/webpack": "^6.2.1",
|
||||
"babel-loader": "^8.2.5",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"prettier": "*",
|
||||
"react": "^18.1.0",
|
||||
"react-dom": "^18.1.0",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const path = require('path')
|
||||
module.exports = () => {
|
||||
return {
|
||||
entry: './src/index.ts',
|
||||
@@ -9,6 +8,8 @@ module.exports = () => {
|
||||
},
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true,
|
||||
},
|
||||
resolve: {
|
||||
fallback: {
|
||||
@@ -31,16 +32,5 @@ module.exports = () => {
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new (require('copy-webpack-plugin'))({
|
||||
patterns: [
|
||||
{
|
||||
from: '**/*.svg',
|
||||
to: 'mobile-exports',
|
||||
context: path.resolve(__dirname, 'src', 'Icons'),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = {
|
||||
tsconfigRootDir: __dirname,
|
||||
},
|
||||
plugins: ['@typescript-eslint', 'prettier'],
|
||||
ignorePatterns: ['.eslintrc.js'],
|
||||
ignorePatterns: ['.eslintrc.js', 'metro.config.js'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
|
||||
@@ -31,7 +31,7 @@ This is a React Native implementation of Standard Notes. React Native allows us
|
||||
4. Install project dependencies via:
|
||||
|
||||
```shell
|
||||
yarn run init
|
||||
yarn install
|
||||
```
|
||||
|
||||
We have two flavors of the app:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "StandardNotes",
|
||||
"displayName": "StandardNotes"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ PODS:
|
||||
- React-RCTImage
|
||||
- RNSearchBar (3.5.1):
|
||||
- React-Core
|
||||
- RNShare (7.6.0):
|
||||
- RNShare (7.6.1):
|
||||
- React-Core
|
||||
- RNStoreReview (0.2.1):
|
||||
- React-Core
|
||||
@@ -744,7 +744,7 @@ SPEC CHECKSUMS:
|
||||
RNReanimated: 46cdb89ca59ab7181334f4ed05a70e82ddb36751
|
||||
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
|
||||
RNSearchBar: 5ed8e13ba8a6c701fbd2afdfe4164493d24b2aee
|
||||
RNShare: 5972e774cd69eec879131b5283f883c1b93fc91c
|
||||
RNShare: d0257bcf7aaf75d9502cea73496661c8d68f3cfc
|
||||
RNStoreReview: e05edbbf426563070524cec384ac0b8df69be801
|
||||
RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8
|
||||
RNVectorIcons: 7923e585eaeb139b9f4531d25a125a1500162a0b
|
||||
|
||||
@@ -6,13 +6,24 @@
|
||||
* https://stackoverflow.com/a/65231261/2504429
|
||||
* @format
|
||||
*/
|
||||
const { getDefaultConfig } = require('metro-config');
|
||||
const path = require('path')
|
||||
const { getDefaultConfig } = require('metro-config')
|
||||
|
||||
const extraNodeModules = {
|
||||
common: path.resolve(__dirname + '../..'),
|
||||
}
|
||||
|
||||
module.exports = (async () => {
|
||||
const {
|
||||
resolver: { sourceExts, assetExts },
|
||||
} = await getDefaultConfig();
|
||||
} = await getDefaultConfig()
|
||||
|
||||
return {
|
||||
watchFolders: [
|
||||
__dirname,
|
||||
path.resolve(__dirname, '../icons'),
|
||||
path.resolve(__dirname, '../styles'),
|
||||
],
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
@@ -25,6 +36,12 @@ module.exports = (async () => {
|
||||
resolver: {
|
||||
assetExts: assetExts.filter(ext => ext !== 'svg'),
|
||||
sourceExts: [...sourceExts, 'svg'],
|
||||
extraNodeModules: new Proxy(extraNodeModules, {
|
||||
get: (target, name) => {
|
||||
const result = name in target ? target[name] : path.join(process.cwd(), `node_modules/${name}`)
|
||||
return result
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
})();
|
||||
}
|
||||
})()
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
"ios-dev": "react-native run-ios --scheme StandardNotesDev",
|
||||
"ios-prod": "react-native run-ios --scheme StandardNotes",
|
||||
"clear-cache": "watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-*",
|
||||
"init": "pod-install ios",
|
||||
"lint": "yarn lint:eslint && yarn lint:prettier",
|
||||
"lint:eslint": "yarn eslint . --ext .ts,.tsx --fix --quiet",
|
||||
"lint:prettier": "prettier ./src --write",
|
||||
"tsc": "tsc --noEmit",
|
||||
"start": "react-native start",
|
||||
"postinstall": "patch-package",
|
||||
"postinstall": "patch-package && yarn pod-install ios",
|
||||
"android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/",
|
||||
"upgrade:snjs": "ncu -u '@standardnotes/*' && yarn"
|
||||
},
|
||||
@@ -83,7 +82,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.17.9",
|
||||
"@babel/preset-typescript": "^7.16.7",
|
||||
"@babel/runtime": "^7.17.9",
|
||||
"@babel/runtime": "^7.18.3",
|
||||
"@react-native-community/eslint-config": "^3.0.1",
|
||||
"@standardnotes/config": "^2.4.3",
|
||||
"@types/detox": "^18.1.0",
|
||||
@@ -103,17 +102,18 @@
|
||||
"eslint-plugin-flowtype": "^8.0.3",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"faker": "^6.6.6",
|
||||
"get-yarn-workspaces": "^1.0.2",
|
||||
"jest": "^27.5.1",
|
||||
"jest-circus": "^27.5.1",
|
||||
"metro-react-native-babel-preset": "^0.70.1",
|
||||
"npm-check-updates": "^12.5.9",
|
||||
"patch-package": "^6.4.7",
|
||||
"pod-install": "^0.1.33",
|
||||
"postinstall-postinstall": "^2.1.0",
|
||||
"prettier": "^2.6.0",
|
||||
"prettier-plugin-organize-imports": "^2.3.4",
|
||||
"react-devtools": "^4.24.6",
|
||||
"react-devtools-core": "^4.24.6",
|
||||
"react-native-monorepo-tools": "^1.1.4",
|
||||
"react-native-pager-view": "^5.4.15",
|
||||
"react-test-renderer": "17.0.2",
|
||||
"replace-in-file": "^6.3.2",
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
import ArchiveIcon from '@standardnotes/icons/dist/mobile-exports/ic-archive.svg'
|
||||
import AttachmentFileIcon from '@standardnotes/icons/dist/mobile-exports/ic-attachment-file.svg'
|
||||
import AuthenticatorIcon from '@standardnotes/icons/dist/mobile-exports/ic-authenticator.svg'
|
||||
import ClearCircleFilledIcon from '@standardnotes/icons/dist/mobile-exports/ic-clear-circle-filled.svg'
|
||||
import CodeIcon from '@standardnotes/icons/dist/mobile-exports/ic-code.svg'
|
||||
import FileDocIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-doc.svg'
|
||||
import FileImageIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-image.svg'
|
||||
import FileMovIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-mov.svg'
|
||||
import FileMusicIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-music.svg'
|
||||
import FileOtherIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-other.svg'
|
||||
import FilePdfIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-pdf.svg'
|
||||
import FilePptIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-ppt.svg'
|
||||
import FileXlsIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-xls.svg'
|
||||
import FileZipIcon from '@standardnotes/icons/dist/mobile-exports/ic-file-zip.svg'
|
||||
import LockFilledIcon from '@standardnotes/icons/dist/mobile-exports/ic-lock-filled.svg'
|
||||
import MarkdownIcon from '@standardnotes/icons/dist/mobile-exports/ic-markdown.svg'
|
||||
import NotesIcon from '@standardnotes/icons/dist/mobile-exports/ic-notes.svg'
|
||||
import OpenInIcon from '@standardnotes/icons/dist/mobile-exports/ic-open-in.svg'
|
||||
import PencilOffIcon from '@standardnotes/icons/dist/mobile-exports/ic-pencil-off.svg'
|
||||
import PinFilledIcon from '@standardnotes/icons/dist/mobile-exports/ic-pin-filled.svg'
|
||||
import SpreadsheetsIcon from '@standardnotes/icons/dist/mobile-exports/ic-spreadsheets.svg'
|
||||
import TasksIcon from '@standardnotes/icons/dist/mobile-exports/ic-tasks.svg'
|
||||
import PlainTextIcon from '@standardnotes/icons/dist/mobile-exports/ic-text-paragraph.svg'
|
||||
import RichTextIcon from '@standardnotes/icons/dist/mobile-exports/ic-text-rich.svg'
|
||||
import TrashFilledIcon from '@standardnotes/icons/dist/mobile-exports/ic-trash-filled.svg'
|
||||
import UserAddIcon from '@standardnotes/icons/dist/mobile-exports/ic-user-add.svg'
|
||||
import FilesIllustration from '@standardnotes/icons/dist/mobile-exports/il-files.svg'
|
||||
import ArchiveIcon from '@standardnotes/icons/src/Icons/ic-archive.svg'
|
||||
import AttachmentFileIcon from '@standardnotes/icons/src/Icons/ic-attachment-file.svg'
|
||||
import AuthenticatorIcon from '@standardnotes/icons/src/Icons/ic-authenticator.svg'
|
||||
import ClearCircleFilledIcon from '@standardnotes/icons/src/Icons/ic-clear-circle-filled.svg'
|
||||
import CodeIcon from '@standardnotes/icons/src/Icons/ic-code.svg'
|
||||
import FileDocIcon from '@standardnotes/icons/src/Icons/ic-file-doc.svg'
|
||||
import FileImageIcon from '@standardnotes/icons/src/Icons/ic-file-image.svg'
|
||||
import FileMovIcon from '@standardnotes/icons/src/Icons/ic-file-mov.svg'
|
||||
import FileMusicIcon from '@standardnotes/icons/src/Icons/ic-file-music.svg'
|
||||
import FileOtherIcon from '@standardnotes/icons/src/Icons/ic-file-other.svg'
|
||||
import FilePdfIcon from '@standardnotes/icons/src/Icons/ic-file-pdf.svg'
|
||||
import FilePptIcon from '@standardnotes/icons/src/Icons/ic-file-ppt.svg'
|
||||
import FileXlsIcon from '@standardnotes/icons/src/Icons/ic-file-xls.svg'
|
||||
import FileZipIcon from '@standardnotes/icons/src/Icons/ic-file-zip.svg'
|
||||
import LockFilledIcon from '@standardnotes/icons/src/Icons/ic-lock-filled.svg'
|
||||
import MarkdownIcon from '@standardnotes/icons/src/Icons/ic-markdown.svg'
|
||||
import NotesIcon from '@standardnotes/icons/src/Icons/ic-notes.svg'
|
||||
import OpenInIcon from '@standardnotes/icons/src/Icons/ic-open-in.svg'
|
||||
import PencilOffIcon from '@standardnotes/icons/src/Icons/ic-pencil-off.svg'
|
||||
import PinFilledIcon from '@standardnotes/icons/src/Icons/ic-pin-filled.svg'
|
||||
import SpreadsheetsIcon from '@standardnotes/icons/src/Icons/ic-spreadsheets.svg'
|
||||
import TasksIcon from '@standardnotes/icons/src/Icons/ic-tasks.svg'
|
||||
import PlainTextIcon from '@standardnotes/icons/src/Icons/ic-text-paragraph.svg'
|
||||
import RichTextIcon from '@standardnotes/icons/src/Icons/ic-text-rich.svg'
|
||||
import TrashFilledIcon from '@standardnotes/icons/src/Icons/ic-trash-filled.svg'
|
||||
import UserAddIcon from '@standardnotes/icons/src/Icons/ic-user-add.svg'
|
||||
import FilesIllustration from '@standardnotes/icons/src/Icons/il-files.svg'
|
||||
|
||||
import { IconType } from '@standardnotes/snjs'
|
||||
import React, { FC, useContext } from 'react'
|
||||
import { SvgProps } from 'react-native-svg'
|
||||
|
||||
Reference in New Issue
Block a user