Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dependencies #102

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .storybook/config.js

This file was deleted.

4 changes: 4 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
stories: ['../stories/stories.js'],
logLevel: 'debug',
}
64 changes: 32 additions & 32 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
const path = require('path');

module.exports = async ({ config }) => {
// Overwrite the default storybook webpack config for same tests loaders are applied serially
config.module.rules = [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.(scss|css)$/,
use: ['vue-style-loader', 'css-loader', {
loader: 'sass-loader',
options: {
data: '$sass-env: development;'
module.exports = async ({config}) => {
// Overwrite the default storybook webpack config for same tests loaders are applied serially
config.module.rules = [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.(scss|css)$/,
use: ['style-loader', 'css-loader', {
loader: 'sass-loader',
options: {
additionalData: '$sass-env: development;'
}
}],
include: path.resolve(__dirname, '../')
},
{
test: /\.pug$/,
loader: 'pug-plain-loader'
},
{
test: /\.(png|jpg|gif)$/,
use: ['file-loader']
}
}],
include: path.resolve(__dirname, '../')
},
{
test: /\.pug$/,
loader: 'pug-plain-loader'
},
{
test: /\.(png|jpg|gif)$/,
use: ['file-loader']
}
];
];

return config;
}
return config;
}
7 changes: 5 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ module.exports = function (api) {
if (api.env('test')) {
return {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}]
]
[
'@babel/preset-env',
],
],
plugins: ['@babel/plugin-transform-runtime'],
}
}

Expand Down
2 changes: 1 addition & 1 deletion build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
input: 'src/main.js',
output: [
{ file: 'dist/eagle.cjs.js', format: 'cjs', banner, exports: 'named' },
{ file: 'dist/eagle.es.js', format: 'es', banner }
{ file: 'dist/eagle.es.js', format: 'es', banner }
],
external: [
'vue',
Expand Down
13 changes: 8 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ module.exports = {
'@/([^\\.]*)$': '<rootDir>/src/$1'
},
moduleFileExtensions: [
'js',
'vue'
"js",
// tell Jest to handle `*.vue` files
"vue"
],
transform: {
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
}
// process `*.js` files with `babel-jest`
".*\\.(js)$": "babel-jest",
// process `*.vue` files with `vue-jest`
".*\\.(vue)$": "vue-jest"
},
}
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,44 @@
"storybook": "start-storybook -p 9001 -c .storybook",
"format": "prettier --write src/themes/**/*.scss src/themes/*.scss",
"lint": "eslint --ext vue,js --format node_modules/eslint-friendly-formatter src test",
"test": "jest --bail",
"test": "jest",
"test:watch": "jest --watch"
},
"dependencies": {
"lodash.throttle": "^4.1.1"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/core": "^7.12.3",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@storybook/vue": "^5.1.1",
"@vue/test-utils": "^1.0.0-beta.29",
"animate.css": "^3.7.0",
"babel-eslint": "^7.1.1",
"babel-jest": "^24.8.0",
"babel-loader": "^8.0.6",
"@storybook/vue": "^6.0.27",
"@vue/test-utils": "^1.1.0",
"animate.css": "^4.1.1",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.1",
"babel-loader": "^8.1.0",
"babel-preset-vue": "^2.0.2",
"css-loader": "^1.0.0",
"eslint": "^3.14.1",
"eslint-config-standard": "^6.2.1",
"eslint-friendly-formatter": "^2.0.7",
"eslint-plugin-html": "^2.0.3",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"file-loader": "^2.0.0",
"jest": "^24.8.0",
"css-loader": "^5.0.0",
"eslint": "^7.11.0",
"eslint-config-standard": "^15.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-html": "^6.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.2",
"file-loader": "^6.1.1",
"jest": "^26.6.1",
"node-sass": "^4.12.0",
"prettier": "^1.15.1",
"pug": "^2.0.3",
"prettier": "^2.1.2",
"pug": "^3.0.0",
"pug-plain-loader": "^1.0.0",
"rollup": "^1.14.3",
"rollup": "^2.32.1",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-vue": "^5.0.0",
"sass-loader": "^7.1.0",
"shelljs": "^0.7.6",
"sass-loader": "^10.0.4",
"shelljs": "^0.8.4",
"vue": "^2.6.10",
"vue-jest": "^4.0.0-beta.2",
"vue-jest": "^3.0.7",
"vue-loader": "^15.7.0",
"vue-template-compiler": "^2.6.10"
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/AnimatedTransition.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template lang='pug'>
transition(:enter-active-class="enter ? 'animated ' + enter : ''",
:leave-active-class="leave ? 'animated ' + leave : ''")
transition(:enter-active-class="enter ? 'animate animate__animated ' + enter : ''",
:leave-active-class="leave ? 'animate animate__animated ' + leave : ''")
slot
</template>
<script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Slideshow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default {
width = document.documentElement.clientWidth
height = document.documentElement.clientHeight
}
self.$el.style.fontSize = (0.04 * Math.min(height, width)) + 'px'
self.$el.style.fontSize = Math.min(height, width) > 0 ? (0.04 * Math.min(height, width)) + 'px' : (0.04 * Math.max(height, width)) + 'px';
}, 16)()
},
handleClick: function (evt) {
Expand Down
4 changes: 2 additions & 2 deletions src/themes/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ $sass-env: production !default;

@function assetUrl($path) {
@if ($sass-env == "development") {
@return url("../assets/"+$path);
@return url("../assets/" + $path);
}

@return url("~eagle.js/dist/themes/assets/"+$path);
@return url("~eagle.js/dist/themes/assets/" + $path);
}
15 changes: 8 additions & 7 deletions stories/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Vue.component('NestedSlideshow', {
<div class='eg-theme-agrume'>
<div class='eg-slideshow'>
<slide>
This is a nested slideshow with only one slide.
<h1>This is a nested slideshow with only one slide.</h1>
<slot />
</slide>
</div>
Expand Down Expand Up @@ -60,13 +60,13 @@ storiesOf('Slideshow', module)
)
.add('multiple slides with enter/exit animation', () =>
render(`
<slide enter='bounceInLeft' leave='bounceOutLeft'>
<slide enter='animate__bounceInLeft' leave='animate__bounceOutLeft'>
<h1>Eagle.js</h1>
</slide>
<slide enter='fadeIn' leave='fadeOut'>
<slide enter='animate__fadeIn' leave='fanimate__adeOut'>
<h1>Eagle.js is easy to use</h1>
</slide>
<slide enter='zoomIn' leave='zoomOut'>
<slide enter='animate__zoomIn' leave='animate__zoomOut'>
<h1>Eagle.js offers max hackbility</h1>
</slide>
`)
Expand All @@ -75,13 +75,14 @@ storiesOf('Slideshow', module)
render(`
<slide :steps='4'>
<h4>
<eg-transition enter='bounceInLeft' leave='bounceOutLeft'>
<p v-if="step == 1">Eagle.js</p>
<eg-transition enter='animate__bounceInLeft' leave='animate__bounceOutLeft'>
<p v-if='step >= 2'><b>Vue.js</b> is one of the coolest frontend frameworks out there</p>
</eg-transition>
<eg-transition enter='bounceInRight' leave='bounceOutRight'>
<eg-transition enter='animate__bounceInRight' leave='animate__bounceOutRight'>
<p v-if='step >= 3'><b>Vue.js</b> supports components and transitions out of the box</p>
</eg-transition>
<eg-transition enter='bounceInLeft' leave='bounceOutLeft'>
<eg-transition enter='animate__bounceInLeft' leave='animate__bounceOutLeft'>
<p v-if='step >= 4'><b>Eagle.js</b> adds navigation logics, scalable components, etc.</p>
</eg-transition>
</h4>
Expand Down
Loading