Skip to content

Commit

Permalink
feat: typescript refactor (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz authored Mar 16, 2021
1 parent 1bb31d3 commit 854c2a5
Show file tree
Hide file tree
Showing 42 changed files with 5,209 additions and 6,045 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

19 changes: 5 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
extends: [
'@nuxtjs'
],
globals: {
page: true,
browser: true,
context: true,
jestPuppeteer: true,
},
}
extends: [
'@nuxtjs',
'@nuxtjs/eslint-config-typescript'
]
}
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: ci

on:
push:
branches:
- master
pull_request:
branches:
- master

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

strategy:
matrix:
os: [ubuntu-latest]
node: [12]

steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: checkout
uses: actions/checkout@master

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn

- name: Test
run: yarn test

- name: Coverage
uses: codecov/codecov-action@v1
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ node_modules
*.log
dist
.nuxt
.DS_Store
.nuxt-storybook
.DS_Store
coverage
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Nuxt Community
Copyright (c) 2021 Nuxt Community

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ npm i @nuxtjs/svg-sprite

## Usage

Add `@nuxtjs/svg-sprite` to modules section of `nuxt.config.js`:
Add `@nuxtjs/svg-sprite` to buildModules section of `nuxt.config.js`:

```js
{
modules: [
buildModules: [
'@nuxtjs/svg-sprite',
],
svgSprite: {
Expand Down Expand Up @@ -71,7 +71,7 @@ You can update them with the `svgSprite` option in `nuxt.config.js`:

```js
export default {
modules: ['@nuxtjs/svg-sprite'],
buildModules: ['@nuxtjs/svg-sprite'],
svgSprite: {
input: '~/assets/svg/'
}
Expand All @@ -88,8 +88,8 @@ export default {

## Integrations
### Storybook
If you are fan of storybook this might be interesting for you, This module provides a story to list and search available icons of your project. You can see stories under `stories` directory.
If you are using [`@nuxtjs/storybook`](https://storybook.nuxtjs.org) you can see the SvgSprites stories under `Modules` section in your storybook. By default Svg Sprites story will shows in your storybook, you disable/hide the story using [Storybook's `modules` option](https://storybook.nuxtjs.org/options#modules)
This module provides a story to list and search available icons of your project. You can see stories under `stories` directory.
If you are using [`@nuxtjs/storybook`](https://storybook.nuxtjs.org) you can see the SvgSprites stories under `Modules` section in your storybook. Sprites will show in your Storybook, unless you disable/hide the story using [Storybook's `modules` option](https://storybook.nuxtjs.org/options#modules)

## Development

Expand Down
11 changes: 0 additions & 11 deletions jest-puppeteer.config.js

This file was deleted.

7 changes: 1 addition & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
module.exports = {
preset: 'jest-puppeteer',
transform: {
// process js with `babel-jest`
'^.+\\.js$': '<rootDir>/node_modules/babel-jest'
},
transformIgnorePatterns: ['/node_modules/']
preset: '@nuxt/test-utils'
}
107 changes: 0 additions & 107 deletions lib/plugin.js

This file was deleted.

91 changes: 0 additions & 91 deletions lib/svg.js

This file was deleted.

Loading

0 comments on commit 854c2a5

Please sign in to comment.