Skip to content

Commit

Permalink
feat: minor housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Mar 7, 2021
1 parent 026a49d commit 231d4c4
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 117 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,50 @@
name: ci

on: [push, pull_request]

jobs:
ci:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [14, 15]

steps:
- name: Checkout 🛎️
uses: actions/checkout@master

- name: Setup node env 📦
uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node }}

- name: Get npm cache directory 🏗
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"

- name: Restore cached node_modules 🤷‍♂️
uses: actions/cache@v2.1.4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies 🛠
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --prefer-offline --no-audit
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Generate the static site ⚡️
run: npm run generate
env:
API_URL: ${{ secrets.API_URL }}
GOOGLE_MAP_KEY: ${{ secrets.GOOGLE_MAP_KEY }}
INIT_CUST_LAT: ${{ secrets.INIT_CUST_LAT }}
INIT_CUST_LNG: ${{ secrets.INIT_CUST_LNG }}
BUILD_ENV: 'ci'

- name: Check for lint errors 👀
run: npm run lint
20 changes: 17 additions & 3 deletions .github/workflows/shipjs-trigger.yml
Expand Up @@ -13,14 +13,28 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
ref: main

- name: Setup node env 📦
uses: actions/setup-node@v1
uses: actions/setup-node@v2.1.5
with:
node-version: 15
registry-url: "https://registry.npmjs.org"

- name: Restore cached node_modules ⚡️
uses: actions/cache@v2.1.4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies 👨🏻‍💻
run: npm ci --prefer-offline --no-audit

- name: Perform a new release 🚨
run: npx shipjs trigger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}
3 changes: 3 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,3 @@
{
"volar.tsPlugin": true
}
10 changes: 0 additions & 10 deletions ava.config.cjs

This file was deleted.

17 changes: 0 additions & 17 deletions babel.config.js
@@ -1,20 +1,3 @@
module.exports = {
presets: ['@babel/preset-env'],
env: {
test: {
plugins: [
[
'module-resolver',
{
root: ['./'],
alias: {
'@': './',
'~': './',
},
},
],
],
ignore: ['ava.config.cjs'],
},
},
};
4 changes: 4 additions & 0 deletions lint-staged.config.js
@@ -0,0 +1,4 @@
module.exports = {
'*.{js,vue}': 'npm run lint:js',
'*.{css,vue}': 'npm run lint:style',
};
91 changes: 47 additions & 44 deletions package.json
@@ -1,64 +1,67 @@
{
"name": "v-vectors",
"version": "1.0.0",
"description": "Scalable Vector Graphics 🤝 Vue3",
"repository": {
"url": "git+https://github.com/vinayakkulkarni/v-vectors",
"type": "git"
},
"author": {
"name": "Vinayak Kulkarni",
"email": "inbox.vinayak@gmail.com",
"url": "https://vinayakkulkarni.dev"
"description": "Scalable Vector Graphics 🤝 Vue 3",
"files": ["dist"],
"private": false,
"main": "dist/v-vectors.js",
"module": "dist/v-vectors.esm.js",
"unpkg": "dist/v-vectors.js",
"jsdelivr": "dist/v-vectors.js",
"cdn": "dist/v-vectors.js",
"types": "dist/src",
"sideEffects": false,
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"license": "MIT",
"files": [
"dist"
],
"scripts": {
"test": "ava",
"test:snapshot": "ava --update-snapshots",
"build": "npm run bundle && npm run bundle:min",
"bundle": "rollup -c build/rollup.config.js",
"bundle:min": "rollup -c build/rollup.min.config.js",
"lint": "npm run lint:eslint && npm run lint:prettier",
"lintfix": "npm run lint:eslint:fix && npm run lint:prettier:fix",
"lint:eslint": "eslint \"{,!(node_modules|dist)/**/}*.{js,vue}\"",
"lint:eslint:fix": "eslint --fix \"{,!(node_modules|dist)/**/}*.{js,vue}\"",
"lint:prettier": "prettier --check \"{,!(node_modules|dist)/**/}*.{js,vue}\"",
"lint:prettier:fix": "prettier --write \"{,!(node_modules|dist)/**/}*.{js,vue}\"",
"lint:eslint": "eslint \"{,!(node_modules|dist)/**/}*.{js,ts,vue}\"",
"lint:eslint:fix": "eslint --fix \"{,!(node_modules|dist)/**/}*.{js,ts,vue}\"",
"lint:prettier": "prettier --check \"{,!(node_modules|dist)/**/}*.{js,ts,vue}\" --ignore-path .gitignore",
"lint:prettier:fix": "prettier --write \"{,!(node_modules|dist)/**/}*.{js,ts,vue}\" --ignore-path .gitignore",
"lint:css": "stylelint \"{,!(node_modules|dist)/**/}*.{css,scss,sass}\"",
"lint:css:fix": "stylelint --fix \"{,!(node_modules|dist)/**/}*.{css,scss,sass}\"",
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:css",
"lintfix": "npm run lint:eslint:fix && npm run lint:prettier:fix && npm run lint:css:fix",
"lint:js": "npm run lint:eslint && npm run lint:prettier",
"lint:style": "npm run lint:css",
"release": "shipjs prepare"
},
"devDependencies": {
"@ava/babel": "^1.0.1",
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-babel": "^5.2.1",
"@vue/test-utils": "^1.1.0",
"ava": "^3.12.1",
"babel-eslint": "^10.1.0",
"babel-plugin-module-resolver": "^4.0.0",
"@babel/core": "^7.13.8",
"@babel/preset-env": "^7.13.9",
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^12.0.1",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-babel": "^5.3.0",
"@vinayakkulkarni/prettier-config-vue": "^1.0.0",
"@vue/compiler-sfc": "^3.0.7",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-prettier": "^8.1.0",
"eslint-config-vue": "^2.0.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-vue": "^6.2.2",
"husky": "^4.3.0",
"jsdom": "^16.4.0",
"jsdom-global": "^3.0.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^7.7.0",
"husky": "4.3.8",
"prettier": "^2.1.1",
"require-extension-hooks": "^0.3.3",
"require-extension-hooks-babel": "^1.0.0",
"require-extension-hooks-vue": "^3.0.0",
"rollup": "^2.26.11",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^5.1.6",
"shipjs": "^0.21.0",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12"
"shipjs": "^0.23.0",
"vue": "^3.0.7"
},
"author": {
"name": "Vinayak Kulkarni",
"email": "inbox.vinayak@gmail.com",
"url": "https://vinayakkulkarni.dev"
},
"license": "MIT",
"repository": {
"url": "git+https://github.com/vinayakkulkarni/v-vectors",
"type": "git"
},
"bugs": {
"url": "https://github.com/vinayakkulkarni/v-vectors/issues"
Expand Down
2 changes: 1 addition & 1 deletion src/Package.vue
Expand Up @@ -5,7 +5,7 @@
</template>

<script lang="ts">
import { defineComponent } from '@vue/composition-api';
import { defineComponent } from 'vue';
export default defineComponent({
name: 'v-vectors',
});
Expand Down
File renamed without changes.
22 changes: 0 additions & 22 deletions test/helpers/ava.setup.js

This file was deleted.

Empty file removed test/snapshot/.gitkeep
Empty file.
20 changes: 0 additions & 20 deletions test/spec/package.spec.js

This file was deleted.

0 comments on commit 231d4c4

Please sign in to comment.