Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepolischuk committed Oct 17, 2023
0 parents commit 9ed6f81
Show file tree
Hide file tree
Showing 16 changed files with 6,681 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["@rambler-tech/eslint-config", "prettier"],
"parserOptions": {
"requireConfigFile": false
}
}
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches:
- master
tags-ignore:
- v*

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version: '18.x'
- run: yarn
- run: |
git config --global user.email $BOT_EMAIL
git config --global user.name rambler-ui-bot
env:
BOT_EMAIL: ${{ secrets.BOT_EMAIL }}
- run: |
echo "@rambler-tech:registry=https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: yarn release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on:
push:
branches:
- master
tags-ignore:
- v*

pull_request:
types:
- opened
- synchronize

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version: '18.x'
- run: yarn
- run: yarn lint

commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version: '18.x'
- run: yarn
- uses: wagoid/commitlint-github-action@v3
env:
NODE_PATH: ${{ github.workspace }}/node_modules
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.DS_Store
node_modules
npm-debug.log
yarn-error.log
lerna-debug.log
coverage
.nyc_output
.vscode
.idea
public
spec.*
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.js": ["prettier --write", "eslint --fix"],
"*.json": ["prettier --write"]
}
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@rambler-tech/prettier-config"
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Rambler Internet Holdings LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Razzle Plugins

Plugins for [Razzle](https://github.com/jaredpalmer/razzle)

## Tools

## Contributing

### Dev environment

#### Start

To start development you need install `yarn` and deps:

```sh
yarn install
```

#### Code quality

To run linting the codebase:

```sh
yarn lint
```

### Publish

To bump version of changed packages and generate changelog run:

```sh
yarn release
```

## License

MIT
18 changes: 18 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "independent",
"npmClient": "yarn",
"packages": ["packages/*"],
"command": {
"version": {
"allowBranch": "master",
"conventionalCommits": true,
"createRelease": "github",
"message": "chore(release): publish",
"ignoreChanges": ["**/*.md"]
},
"publish": {
"yes": true,
"verifyAccess": false
}
}
}
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "razzle-plugins",
"description": "Plugins for Razzle",
"scripts": {
"lint": "eslint '**/*.js'",
"format": "prettier --write '**/*.js' && eslint '**/*.js' --fix",
"release": "lerna version && lerna publish from-package",
"prepare": "[ -n \"$CI\" ] && exit 0 || husky install"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rambler-digital-solutions/razzle-plugins.git"
},
"author": "Andrey Polischuk <[email protected]>",
"license": "MIT",
"private": true,
"devDependencies": {
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"@rambler-tech/eslint-config": "^0.1.1",
"@rambler-tech/prettier-config": "^0.1.0",
"eslint": "^8.49.0",
"eslint-config-prettier": "^9.0.0",
"husky": "^8.0.3",
"lerna": "^7.3.0",
"lint-staged": "^14.0.1",
"prettier": "^3.0.3"
},
"workspaces": [
"packages/*"
]
}
Loading

0 comments on commit 9ed6f81

Please sign in to comment.