forked from nuxt-community/svg-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move to nuxt-community and improvements
- Loading branch information
pooya parsa
committed
Aug 12, 2019
1 parent
0eed863
commit d523622
Showing
19 changed files
with
10,503 additions
and
6,836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node | ||
steps: | ||
# Checkout repository | ||
- checkout | ||
|
||
# Restore cache | ||
- restore_cache: | ||
key: yarn-cache-{{ checksum "yarn.lock" }} | ||
|
||
# Install dependencies | ||
- run: | ||
name: Install Dependencies | ||
command: NODE_ENV=dev yarn | ||
|
||
# Keep cache | ||
- save_cache: | ||
key: yarn-cache-{{ checksum "yarn.lock" }} | ||
paths: | ||
- "node_modules" | ||
|
||
# Lint | ||
- run: | ||
name: Lint | ||
command: yarn lint | ||
|
||
# Tests | ||
- run: | ||
name: Tests | ||
command: yarn jest | ||
|
||
# Coverage | ||
- run: | ||
name: Coverage | ||
command: yarn codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Common | ||
node_modules | ||
dist | ||
.nuxt | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
parser: 'babel-eslint', | ||
sourceType: 'module' | ||
}, | ||
extends: [ | ||
'@nuxtjs' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
node_modules/ | ||
node_modules | ||
*.iml | ||
.idea | ||
*.log* | ||
.nuxt | ||
.vscode | ||
.DS_Store | ||
coverage | ||
dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', { | ||
targets: { | ||
esmodules: true | ||
} | ||
} | ||
] | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { resolve } = require('path') | ||
|
||
module.exports = { | ||
rootDir: resolve(__dirname, '..'), | ||
buildDir: resolve(__dirname, '.nuxt'), | ||
srcDir: __dirname, | ||
render: { | ||
resourceHints: false | ||
}, | ||
modules: [ | ||
{ handler: require('../') } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<template> | ||
<div> | ||
<h3>External Import:</h3> | ||
<img src="~assets/nuxt.svg"> | ||
|
||
<h3>Inline base64:</h3> | ||
<img src="~assets/nuxt.svg?data"> | ||
|
||
<h3>Inline Components:</h3> | ||
<NuxtLogo /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import NuxtLogo from '~/assets/nuxt.svg?inline' | ||
export default { | ||
components: { | ||
NuxtLogo | ||
} | ||
} | ||
</script> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
testEnvironment: 'node', | ||
collectCoverage: true, | ||
collectCoverageFrom: [ | ||
'lib/**/*.js', | ||
'!lib/plugin.js' | ||
], | ||
moduleNameMapper: { | ||
'^~/(.*)$': '<rootDir>/lib/$1', | ||
'^~~$': '<rootDir>', | ||
'^@@$': '<rootDir>', | ||
'^@/(.*)$': '<rootDir>/lib/$1' | ||
}, | ||
transform: { | ||
'^.+\\.js$': 'babel-jest' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.