Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
asurance committed Oct 14, 2024
0 parents commit 8de9092
Show file tree
Hide file tree
Showing 15 changed files with 3,606 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.DS_Store

.pnp
.pnp.js
.env.local
.env.*.local
.history
*.log*

node_modules/
.yarn-integrity
.pnpm-store/
*.tsbuildinfo
.changeset/pre.json

dist/
coverage/
release/
output/
output_resource/
log/

.vscode/**/*
!.vscode/settings.json
!.vscode/extensions.json
.idea/

**/*/typings/auto-generated

modern.config.local.*
32 changes: 32 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.DS_Store

.pnp
.pnp.js
.env.local
.env.*.local
.history
*.log*

node_modules/
.yarn-integrity
*.tsbuildinfo

coverage/
release/
output/
output_resource/
tests/

.vscode/**/*
!.vscode/settings.json
!.vscode/extensions.json
.idea/

src/

modern.config.*
jest.config.js
tsconfig.json
CHANGELOG.md

**/*/api/typings/auto-generated
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
strict-peer-dependencies=false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/hydrogen
14 changes: 14 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"recommendations": [
"styled-components.vscode-styled-components",
"EditorConfig.editorconfig",
"streetsidesoftware.code-spell-checker",
"codezombiech.gitignore",
"aaron-bond.better-comments",
"jasonnutter.search-node-modules",
"jock.svg",
"mikestead.dotenv",
"vscode-icons-team.vscode-icons",
"biomejs.biome"
]
}
88 changes: 88 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"files.associations": {
".code-workspace": "jsonc",
".stylelintrc": "jsonc",
"stylelintrc": "jsonc",
"README": "markdown"
},
"search.useIgnoreFiles": true,
"search.exclude": {
"**/dist": true,
"**/*.log": true,
"**/*.pid": true,
"**/.git": true,
"**/node_modules": true
},
//
"editor.rulers": [80, 120],
"files.eol": "\n",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
//
"cSpell.diagnosticLevel": "Hint",
"javascript.validate.enable": false,
"typescript.validate.enable": true,
"css.validate": false,
"scss.validate": false,
"less.validate": false,
"[css]": {
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true
},
"[scss]": {
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true
},
"[less]": {
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true
},
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
},
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports": "never",
"source.organizeImports.biome": "explicit"
},
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports": "never",
"source.organizeImports.biome": "explicit"
},
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports": "never",
"source.organizeImports.biome": "explicit"
},
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports": "never",
"source.organizeImports.biome": "explicit"
},
},
"emmet.triggerExpansionOnTab": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Modern.js Package

## Setup

Install the dependencies:

```bash
pnpm run install
```

## Get Started

Run and debug the module:

```bash
pnpm run dev
```

Build the module for production:

```bash
pnpm run build
```

Enable optional features:

```bash
pnpm run new
```

Other commands:

```bash
pnpm run lint # Lint and fix source files
pnpm run change # Add a new changeset
pnpm run bump # Update version and changelog via changeset
pnpm run release # Release the package
```

For more information, see the [Modern.js Module documentation](https://modernjs.dev/module-tools/en).
34 changes: 34 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"vcs": {
"enabled": true,
"defaultBranch": "main",
"clientKind": "git",
"useIgnoreFile": true
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"arrowParentheses": "asNeeded",
"jsxQuoteStyle": "double",
"lineWidth": 80
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"organizeImports": {
"enabled": true
},
"files": {
"ignoreUnknown": true,
"ignore": [".vscode/**/*", "node_modules/**/*", "dist/**/*"]
}
}
6 changes: 6 additions & 0 deletions modern.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig, moduleTools } from '@modern-js/module-tools';

export default defineConfig({
plugins: [moduleTools()],
buildPreset: 'npm-library',
});
47 changes: 47 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "use-atom-creator",
"version": "0.1.0",
"types": "./dist/types/index.d.ts",
"main": "./dist/lib/index.js",
"module": "./dist/es/index.js",
"scripts": {
"prepare": "modern build && simple-git-hooks",
"dev": "modern dev",
"build": "modern build",
"build:watch": "modern build -w",
"reset": "npx rimraf node_modules ./**/node_modules",
"lint": "biome check",
"change": "modern change",
"bump": "modern bump",
"pre": "modern pre",
"change-status": "modern change-status",
"gen-release-note": "modern gen-release-note",
"release": "modern release",
"new": "modern new",
"upgrade": "modern upgrade"
},
"lint-staged": {
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
"biome check --files-ignore-unknown=true"
]
},
"simple-git-hooks": {
"pre-commit": "npx lint-staged"
},
"dependencies": {},
"peerDependencies": {},
"devDependencies": {
"@modern-js/module-tools": "2.60.3",
"@biomejs/biome": "1.8.3",
"typescript": "~5.0.4",
"@types/node": "~16.11.7",
"rimraf": "^6.0.1",
"lint-staged": "~13.1.0",
"simple-git-hooks": "^2.11.1"
},
"sideEffects": [],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
Loading

0 comments on commit 8de9092

Please sign in to comment.