feat: mobile app package (#1075)

This commit is contained in:
Mo
2022-06-09 09:45:15 -05:00
committed by GitHub
parent 58b63898de
commit 8248a38280
336 changed files with 47696 additions and 22563 deletions

View File

@@ -1,3 +1,4 @@
{
"extends": ["../../node_modules/@standardnotes/config/src/.eslintrc"]
"extends": ["../../node_modules/@standardnotes/config/src/.eslintrc"],
"ignorePatterns": [".eslintrc.js", "*.webpack.*.js", "webpack-defaults.js", "jest.config.js", "__mocks__"]
}

View File

@@ -1,32 +1,31 @@
{
"name": "@standardnotes/toast",
"version": "1.0.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "./dist/index.js",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "yarn run tsc",
"build": "yarn tsc",
"clean": "rm -fr dist",
"prestart": "yarn clean",
"start": "tsc -p tsconfig.json --watch",
"tsc": "tsc --project tsconfig.json",
"prebuild": "yarn clean",
"lint": "eslint ./src"
},
"peerDependencies": {
"react": "^18",
"react-dom": "^18"
},
"dependencies": {
"@nanostores/react": "^0.2.0",
"@standardnotes/config": "^2.4.3",
"@standardnotes/icons": "^1.1.7",
"@standardnotes/icons": "*",
"nanoid": "^3.3.4",
"nanostores": "^0.5.12"
},
"devDependencies": {
"@babel/preset-env": "^7.18.0",
"@babel/preset-react": "^7.17.12",
"@babel/preset-typescript": "^7.17.12"
},
"peerDependencies": {
"react": "17"
"eslint": "*",
"typescript": "*"
}
}

View File

@@ -1,5 +1,5 @@
export { ToastContainer } from './ToastContainer'
export { addToast, updateToast, dismissToast } from './toastStore'
export { ToastType } from './enums'
export { addTimedToast } from './addTimedToast'
export type { Toast, ToastAction, ToastOptions } from './types'
export * from './ToastContainer'
export * from './toastStore'
export * from './enums'
export * from './addTimedToast'
export * from './types'

View File

@@ -0,0 +1,32 @@
const path = require('path')
module.exports = () => {
return {
entry: './src/index.ts',
output: {
filename: './dist.js',
},
mode: 'production',
resolve: {
extensions: ['.ts', '.tsx', '.js'],
},
externals: {
"@standardnotes/icons": path.resolve(__dirname, "./node_modules/@standardnotes/icons")
},
module: {
rules: [
{
test: /\.(js|tsx?)$/,
use: [
'babel-loader',
{
loader: 'ts-loader',
options: {
transpileOnly: true,
},
},
],
},
],
},
}
}

View File

@@ -1,12 +1,9 @@
{
"extends": "../../node_modules/@standardnotes/config/src/tsconfig.json",
"extends": "../../UILib.tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "src",
"outDir": "dist",
"jsx": "react-jsx",
"skipLibCheck": true,
"module": "es2022"
"outDir": "dist"
},
"include": ["src"],
"exclude": ["dist", "node_modules"]