Skip to content

Commit

Permalink
setup
Browse files Browse the repository at this point in the history
  • Loading branch information
d3m1d0v committed Nov 13, 2024
1 parent cc061ad commit bd0c67e
Show file tree
Hide file tree
Showing 21 changed files with 7,529 additions and 81 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/build
/coverage
/node_modules

.idea
.vscode
.history
.env
.DS_Store
node_modules
/lib
/dist
/cache
6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
root: true,
extends: require.resolve('@diplodoc/lint/eslint-config'),
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
};
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@
# libraries
npm-debug.log


.history
node_modules
/lib
/dist
/cache
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run pre-commit
6 changes: 6 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}': ['prettier --write', 'eslint --max-warnings=0 --fix'],
'**/*.{css,scss}': ['prettier --write', 'stylelint --fix'],
'**/*.{json,yaml,yml,md}': ['prettier --write'],
'**/*.{svg,svgx}': ['svgo'],
};
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.idea
.vscode
.history
.env
.DS_Store
node_modules
/lib
/dist
/build
/cache
/coverage
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@diplodoc/lint/prettier-config');
11 changes: 11 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.idea
.vscode
.history
.env
.DS_Store
node_modules
/lib
/dist
/build
/cache
/coverage
3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: require.resolve('@diplodoc/lint/stylelint-config'),
};
4 changes: 0 additions & 4 deletions README-template.md

This file was deleted.

11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
## How to start
# Diplodoc file extension

```bash
# Clone this repo to new folder
git clone git@github.com:diplodoc-platform/package-template.git new-package
cd new-package

# Init repo with new package name
./init.sh new-package
```
[![NPM version](https://img.shields.io/npm/v/@diplodoc/file-extension.svg?style=flat)](https://www.npmjs.org/package/@diplodoc/file-extension)

20 changes: 0 additions & 20 deletions esbuild/build.js

This file was deleted.

22 changes: 22 additions & 0 deletions esbuild/build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env node

import {build} from 'esbuild';

import tsConfig from '../tsconfig.json' assert {type: 'json'};

const outDir = 'build';

/** @type {import('esbuild').BuildOptions} */
const common = {
bundle: true,
sourcemap: true,
target: tsConfig.compilerOptions.target,
tsconfig: './tsconfig.json',
};

build({
...common,
entryPoints: ['src/index.ts'],
outfile: outDir + '/index.js',
packages: 'external',
});
21 changes: 0 additions & 21 deletions init.sh

This file was deleted.

Loading

0 comments on commit bd0c67e

Please sign in to comment.