Skip to content

Commit

Permalink
feat: merge & nest
Browse files Browse the repository at this point in the history
  • Loading branch information
vis97c committed Jun 12, 2023
0 parents commit c5a0916
Show file tree
Hide file tree
Showing 20 changed files with 8,936 additions and 0 deletions.
110 changes: 110 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,110 @@
# Javascript Node CircleCI 2.1 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1
orbs:
node: circleci/node@5.0.0
defaults: &defaults
parallelism: 1
working_directory: ~/repo
docker:
- image: cimg/node:16.19.0
release: &release
steps:
- checkout
- attach_workspace:
at: ~/repo
- run:
name: Release npm package
command: npx semantic-release

jobs:
setup:
<<: *defaults
steps:
- checkout
# Download and cache dependencies
- node/install-packages:
pkg-manager: yarn
- persist_to_workspace:
root: ~/repo
paths:
- node_modules

check_commit_message:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/repo
- run:
name: Define environment variable with lastest commit's message
command: |
echo 'export COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")' >> $BASH_ENV
source $BASH_ENV
- run:
name: Lint commit message
command: echo "$COMMIT_MESSAGE" | npx commitlint

check_code:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/repo
- run:
name: Eslint check
command: yarn lint
- run:
name: Jest tests
command: yarn test

get_npm_release_version:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/repo
- run:
name: Dry release
command: npx semantic-release --dry-run

release_to_npm:
<<: *defaults
<<: *release

workflows:
check_and_release_workflow:
jobs:
- setup
- check_commit_message:
requires:
- setup
- check_code:
requires:
- check_commit_message
- get_npm_release_version:
context: npm-deploy
requires:
- check_code
filters:
branches:
only:
- master
- approve_npm_release:
type: approval
requires:
- get_npm_release_version
filters:
branches:
only:
- master
- release_to_npm:
context: npm-deploy
requires:
- approve_npm_release
filters:
branches:
only:
- master
9 changes: 9 additions & 0 deletions .editorconfig
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
*.css linguist-detectable=false
*.js linguist-detectable=true
6 changes: 6 additions & 0 deletions .gitignore
@@ -0,0 +1,6 @@
node_modules/
npm-debug.log
yarn-error.log
.vscode/

coverage/
15 changes: 15 additions & 0 deletions .npmignore
@@ -0,0 +1,15 @@
yarn-error.log

*.test.js
.travis.yml
.editorconfig
.gitattributes
.github
index.test.js

CHANGELOG.md

logo.svg

test/
coverage/
2 changes: 2 additions & 0 deletions .prettierignore
@@ -0,0 +1,2 @@
test/*.css
*.lock
18 changes: 18 additions & 0 deletions .releaserc
@@ -0,0 +1,18 @@
{
"branches": [
"master"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogTitle": "PostCSS Merge At Rules"
}
],
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
}
20 changes: 20 additions & 0 deletions LICENSE
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright 2023 Yunus Gaziev <vis97c@outlook.com>

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.

0 comments on commit c5a0916

Please sign in to comment.