Skip to content

Commit

Permalink
feat: monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
avil13 committed Oct 25, 2020
1 parent 87372f5 commit 4b0bc73
Show file tree
Hide file tree
Showing 33 changed files with 342 additions and 250 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- master

defaults:
run:
shell: bash
working-directory: packages/vue-sweetalert2

jobs:
test:
name: Testing job
Expand All @@ -26,8 +31,21 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
# Проверяем изменилась ли версия
- name: Set CURRENT VERSION to ENV
run: echo ::set-env name=CURRENT_VERSION::$(node -p -e "require('./package.json').version")

- name: Set PUBLIC VERSION to ENV
run: echo ::set-env name=PUBLIC_VERSION::$(npm show vue-sweetalert2 version)

- name: Set NEED_PUBLISH
run: echo ::set-env name=NEED_PUBLISH::$([[ "$CURRENT_VERSION"!="$PUBLIC_VERSION" ]] && echo '1' || echo '')

- run: yarn
if: ${{ env.NEED_PUBLISH }}

- run: yarn publish
if: ${{ env.NEED_PUBLISH }}
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
defaults:
run:
shell: bash
working-directory: packages/vue-sweetalert2

on: pull_request

name: Pull Request
jobs:
test:
Expand All @@ -8,6 +14,7 @@ jobs:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: 8
- run: npm ci
- run: npm run test
node-version: 12
- run: cd packages/vue-sweetalert2
- run: yarn
- run: yarn test
176 changes: 0 additions & 176 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
70 changes: 1 addition & 69 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,5 @@
{
"name": "vue-sweetalert2",
"version": "4.0.1",
"description": "Simple Vue sweetalert2 package",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["src", "nuxt", "dist"],
"scripts": {
"build": "tsc -p .",
"test": "jest --no-cache",
"test:watch": "jest --watch",
"test:coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"prepublish": "npm run test && npm run build && auto-changelog",
"__postpublish": "npm run test:coveralls",
"lint:prettier": "prettier --write src/*.ts",
"lint:ts": "tsc --noEmit --skipLibCheck",
"lint": "npm run lint:prettier && npm run lint:ts"
},
"keywords": ["sweetalert", "sweetalert2", "alert", "prompt", "ssr"],
"author": "Aleksey Pivkin @avil13",
"license": "MIT",
"dependencies": {
"sweetalert2": "10.x"
},
"homepage": "https://avil13.github.io/vue-sweetalert2/",
"repository": {
"type": "git",
"url": "git+https://github.com/avil13/vue-sweetalert2.git"
},
"devDependencies": {
"@types/jest": "^26.0.14",
"@types/node": "^14.11.8",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"@vue/eslint-config-typescript": "^7.0.0",
"@vue/test-utils": "^1.1.0",
"auto-changelog": "^2.2.1",
"babel-core": "^6.26.3",
"babel-eslint": "^10.1.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-3": "^6.24.1",
"babel-preset-vue": "^2.0.2",
"coveralls": "^3.1.0",
"eslint": "^7.11.0",
"eslint-plugin-vue": "^7.0.1",
"husky": "^4.3.0",
"jest": "^26.5.3",
"lint-staged": "^10.4.0",
"prettier": "^2.1.2",
"require-hacker": "^3.0.1",
"ts-jest": "^26.4.1",
"typescript": "^4.0.3",
"vue": "^2.6.12",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.6.12"
},
"nodemonConfig": {
"watch": ["src"],
"exec": "npm run prepublish",
"delay": 2500
},
"lint-staged": {
"*.{js,html,vue,md,json}": ["npm run lint:prettier"],
"*.{ts}": ["npm run lint:prettier && npm run lint:ts"]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm test",
"pre-push": "lint-staged && npm test"
}
}
"private": true
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions packages/vue-sweetalert2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
node_modules
dist
npm-shrinkwrap.json

.DS_Store
node_modules/
dist/
npm-debug.log
yarn-error.log

#yarn.lock
package-lock.json

# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln

.vscode/settings.json
coverage

.npmrc

dist
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4b0bc73

Please sign in to comment.