Skip to content

Commit

Permalink
chore: switch to pnpm 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurk91 committed Dec 19, 2021
1 parent 6d8aa5c commit 5720d45
Show file tree
Hide file tree
Showing 11 changed files with 5,914 additions and 5,774 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
**I'm submitting a ...** (check one with "x")

```
[ ] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe
```

**Tell about your platform**

* flatPickr version : 4.x.x
* Vue.js version : 3.x
* Browser name and version : Chrome|Firefox|Edge x.x.x
* This package version : x.x.x
* This package version : 9.x.x

**Current behavior**
<!-- Describe how the bug manifests. -->
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,42 @@ on:
branches:
- master
- dev
- 8.x
schedule:
- cron: '0 0 11 * *'

jobs:
build:

runs-on: ubuntu-latest
timeout-minutes: 5

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Checkout code
uses: actions/checkout@v2

- name: Using Node.js ${{ matrix.node-version }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: 16.x

- run: yarn install --non-interactive --frozen-lockfile
- run: yarn test --verbose
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 6.23.0

- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: npm run test
- run: bash <(curl -s https://codecov.io/bash)
- run: yarn run build
- run: yarn run docs
- run: npm run build
- run: npm run docs

- name: Deploy to gh-pages
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@releases/v4
uses: JamesIves/github-pages-deploy-action@4.1.8
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: gh-pages
folder: docs
single-commit: true
clean: true

15 changes: 5 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# http://git-scm.com/docs/gitignore

# different IDEs
.idea
.project
# various IDEs
.idea/
*.sublime-*
.vscode
.vscode/

# logs and cache
/logs/
*.log
npm-debug.log*
.sass-cache
.cache
.php_cs.cache

# OS generated files
[Tt]humbs.db
Expand All @@ -35,13 +34,9 @@ $RECYCLE.BIN/
*.DS_Store
.DS_Store?

# node packages
# 3rd party vendor
node_modules/

# Composer, exclude on root vendor folder
/vendor/
composer.phar

# Security tokens
*.pem
*.pub
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## [9.0.5](https://github.com/ankurk91/vue-flatpickr-component/compare/9.0.4...9.0.5)

* Fix: [#238](https://github.com/ankurk91/vue-flatpickr-component/pull/238)
*

## [9.0.4](https://github.com/ankurk91/vue-flatpickr-component/compare/9.0.3...9.0.4)

* Fix: [#224](https://github.com/ankurk91/vue-flatpickr-component/issues/224)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,17 @@ The component accepts these props:
## Run examples on your localhost

* Clone this repo
* You should have node-js `12.14.0>=` and yarn `>=1.x` pre-installed
* Install dependencies `yarn install`
* Run webpack dev server `yarn start`
* This should open the demo page at `http://localhost:9000` in your default web browser
* Make sure you have node-js `>=16.9` and [pnpm](https://pnpm.io/) `>=6.23` pre-installed
* Install dependencies `pnpm install`
* Run webpack dev server `npm start`
* This should open the demo page in your default web browser

## Testing

* This package is using [Jest](https://github.com/facebook/jest)
and [vue-test-utils](https://github.com/vuejs/vue-test-utils-next) for testing.
* Tests can be found in `__test__` folder.
* Execute tests with this command `yarn test`
* Execute tests with this command `npm test`

## Changelog

Expand Down
19 changes: 19 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
testEnvironment: 'jsdom',
collectCoverage: true,
testURL: 'http://localhost',
transform: {
'^.+\\.js$': 'babel-jest',
},
moduleFileExtensions: [
'js',
'json',
'jsx',
'node',
'vue',
],
watchPathIgnorePatterns: [
"<rootDir>/examples/",
"/node_modules/"
]
}
32 changes: 6 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"homepage": "https://github.com/ankurk91/vue-flatpickr-component",
"scripts": {
"test": "jest",
"test:watch": "yarn run test --watch --notify",
"start": "yarn run dev",
"test:watch": "npm run test --watch --notify",
"start": "npm run dev",
"dev": "cross-env NODE_ENV=development webpack serve --progress --hot --config=webpack.config.dev.js",
"docs": "cross-env NODE_ENV=production webpack --config=webpack.config.dev.js --progress --mode=production",
"build": "cross-env NODE_ENV=production webpack --progress --mode=production",
"prepublishOnly": "yarn run test && yarn run build"
"prepublishOnly": "npm run test && npm run build"
},
"dependencies": {
"flatpickr": "^4.6.9"
Expand All @@ -42,7 +42,7 @@
"@babel/core": "^7.14.6",
"@babel/preset-env": "^7.14.7",
"@vue/compiler-sfc": "^3.2.6",
"@vue/test-utils": "^2.0.0-rc.12",
"@vue/test-utils": "^2.0.0-rc.17",
"babel-jest": "^27.0.6",
"babel-loader": "^8.2.2",
"bootstrap": "^4.6",
Expand All @@ -54,35 +54,15 @@
"mini-css-extract-plugin": "^2.1.0",
"style-loader": "^3.0.0",
"vue": "^3.0",
"vue-jest": "^5.0.0-alpha.10",
"vue-loader": "^16.0",
"webpack": "^5.51.1",
"webpack": "^5.65.0",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "^4.0.0"
"webpack-dev-server": "^4.6.0"
},
"peerDependencies": {
"vue": "^3.0.0"
},
"engines": {
"node": ">=10.13.0"
},
"jest": {
"testEnvironment": "jsdom",
"moduleFileExtensions": [
"js",
"json",
"jsx",
"node",
"vue"
],
"transform": {
"^.+\\.js$": "babel-jest"
},
"collectCoverage": true,
"testURL": "http://localhost",
"watchPathIgnorePatterns": [
"<rootDir>/examples/",
"/node_modules/"
]
}
}
Loading

0 comments on commit 5720d45

Please sign in to comment.