Skip to content

Commit

Permalink
initial comit
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Jan 20, 2021
0 parents commit 3387409
Show file tree
Hide file tree
Showing 50 changed files with 13,511 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .babelrc.js
@@ -0,0 +1,33 @@
module.exports = api => {
// Testing if babel is being run in test mode
const isTest = api.env("test")
/**
* Cache the returned value forever and don't call this function again. This is the default behavior but since we
* are reading the env value above, we need to explicitly set it after we are done doing that, else we get a
* caching was left unconfigured error.
*/
api.cache(true)
return {
presets: [
// Enabling Babel to understand TypeSFcript
"@babel/preset-typescript",
[
// Allows smart transpilation according to target environments
"@babel/preset-env",
{
// Specifying which browser versions you want to transpile down to
targets: {
browsers: ["last 2 versions"],
},
/**
* Specifying what module type should the output be in.
* For test cases, we transpile all the way down to commonjs since jest does not understand TypeScript.
* For all other cases, we don't transform since we want Webpack to do that in order for it to do
* dead code elimination (tree shaking) and intelligently select what all to add to the bundle.
*/
modules: isTest ? "commonjs" : false,
},
],
],
}
}
21 changes: 21 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,21 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"parser": "@typescript-eslint/parser",
"rules": {
"prefer-const": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-ts-comment": 0,
"import/no-unresolved": 0
}
}
89 changes: 89 additions & 0 deletions .gitignore
@@ -0,0 +1,89 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Webpack
.webpack/

# Electron-Forge
out/
8 changes: 8 additions & 0 deletions .prettierrc.toml
@@ -0,0 +1,8 @@
printWidth = 79
trailingComma = "es5"
semi = false
singleQuote = false
useTabs = true
bracketSpacing = false
jsxBracketSameLine = true
arrowParens = "avoid"
127 changes: 127 additions & 0 deletions package.json
@@ -0,0 +1,127 @@
{
"name": "mayo-editor",
"productName": "mayo",
"version": "1.0.0",
"description": "a markdown text editor for large rabbits",
"main": ".webpack/main",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts .",
"test": "jest"
},
"keywords": [],
"author": {
"name": "chee",
"email": "chee@snoot.club"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "mayo_editor"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
],
"plugins": [
[
"@electron-forge/plugin-webpack",
{
"mainConfig": "./webpack.main.config.js",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
{
"html": "./src/index.html",
"js": "./src/electron/renderer.ts",
"name": "main_window"
}
]
}
}
]
]
}
},
"devDependencies": {
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@electron-forge/cli": "^6.0.0-beta.54",
"@electron-forge/maker-deb": "^6.0.0-beta.54",
"@electron-forge/maker-rpm": "^6.0.0-beta.54",
"@electron-forge/maker-squirrel": "^6.0.0-beta.54",
"@electron-forge/maker-zip": "^6.0.0-beta.54",
"@electron-forge/plugin-webpack": "6.0.0-beta.54",
"@marshallofsound/webpack-asset-relocator-loader": "^0.5.0",
"@types/jest": "^26.0.20",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"css-loader": "^4.2.1",
"electron": "11.2.0",
"eslint": "^7.6.0",
"eslint-plugin-import": "^2.20.0",
"fork-ts-checker-webpack-plugin": "^5.0.14",
"jest": "^26.6.3",
"node-loader": "^1.0.1",
"prettier": "^2.2.1",
"style-loader": "^1.2.1",
"ts-loader": "^8.0.2",
"typescript": "^4.0.2",
"webpack": "^5.16.0"
},
"dependencies": {
"@chee/lima": "^1.0.0-alpha.2",
"@github/catalyst": "^1.0.2",
"@open-wc/lit-helpers": "^0.3.12",
"@types/clone-deep": "^4.0.1",
"@types/mdast": "^3.0.3",
"@types/shortid": "^0.0.29",
"@types/unist": "^2.0.3",
"@types/wicg-file-system-access": "^2020.9.1",
"@webcomponents/webcomponentsjs": "^2.5.0",
"clone-deep": "^4.0.1",
"electron-squirrel-startup": "^1.0.0",
"hast-util-to-html": "^7.1.2",
"lit-element": "^2.4.0",
"lit-html": "^1.3.0",
"mdast-util-compact": "^3.0.0",
"mdast-util-from-markdown": "^0.8.4",
"mdast-util-to-markdown": "^0.6.2",
"remark-highlight.js": "^6.0.0",
"remark-html": "^13.0.1",
"remark-parse": "^9.0.0",
"shortid": "^2.2.16",
"unified": "^9.2.0",
"unist-builder": "^2.0.3",
"unist-util-find": "^1.0.2",
"unist-util-find-all-between": "^2.1.0",
"unist-util-parents": "^1.0.3",
"unist-util-remove": "^2.0.1",
"unist-util-remove-position": "^3.0.0",
"unist-util-select": "^3.0.4",
"unist-util-visit": "^2.0.3",
"unist-util-visit-parents": "^3.1.1",
"unist-utils-core": "^1.0.5",
"vfile": "^4.2.1"
}
}

0 comments on commit 3387409

Please sign in to comment.