Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

Change syntax to eslint-standart friendly for generated component #3

Open
wants to merge 1 commit 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
6 changes: 3 additions & 3 deletions dist/blueprints/component/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<template src="./{{name}}.component.{{ filesType.html }}"></template>
<script src="./{{name}}.component.{{ filesType.js }}"></script>
<style src="./{{name}}.component.{{ filesType.style }}" scoped lang="{{ filesType.style }}"></style>
<template src='./{{name}}.component.{{ filesType.html }}'></template>
<script src='./{{name}}.component.{{ filesType.js }}'></script>
<style src='./{{name}}.component.{{ filesType.style }}' scoped lang='{{ filesType.style }}'></style>

10 changes: 3 additions & 7 deletions dist/blueprints/component/temp.component.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
export default {
export default {
name: '{{name | kebabCase}}',
props: [],
mounted() {

mounted () {
},
data() {
data () {
return {

}
},
methods: {

},
computed: {

}
}

20 changes: 10 additions & 10 deletions dist/blueprints/component/temp.component.spec.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import Vue from 'vue';
import {{name | camelCase}}Component from './index.vue';
import Vue from 'vue'
import {{name | camelCase}}Component from './index.vue'

// Here are some Jasmine 2.0 tests, though you can
// use any test runner / assertion library combo you prefer
describe('{{name | camelCase}}Component', () => {
// Inspect the raw component options
it('has a created hook', () => {
// expect(typeof {{name | camelCase}}Component.created).toBe('function');
// expect(typeof {{name | camelCase}}Component.created).toBe('function')
})
// Evaluate the results of functions in
// the raw component options
it('sets the correct default data', () => {
// expect(typeof {{name | camelCase}}Component.data).toBe('function')
// const defaultData = {{name | camelCase}}Component.data();
// expect(defaultData.message).toBe('hello!');
// const defaultData = {{name | camelCase}}Component.data()
// expect(defaultData.message).toBe('hello!')
})
// Inspect the component instance on mount
it('correctly sets the message when created', () => {
// const vm = new Vue({{name | camelCase}}Component).$mount();
// expect(vm.message).toBe('bye!');
// const vm = new Vue({{name | camelCase}}Component).$mount()
// expect(vm.message).toBe('bye!')
})
// Mount an instance and inspect the render output
it('renders the correct message', () => {
// const Ctor = Vue.extend({{name | camelCase}}Component);
// const vm = new Ctor().$mount();
// expect(vm.$el.textContent).toBe('bye!');
// const Ctor = Vue.extend({{name | camelCase}}Component)
// const vm = new Ctor().$mount()
// expect(vm.$el.textContent).toBe('bye!')
})
})
5 changes: 2 additions & 3 deletions dist/blueprints/component/temp.sty.extension
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.{{name | kebabCase}} {

}
.{{name | kebabCase}}
// styles
4 changes: 2 additions & 2 deletions dist/config/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"filesType": {
"js": "js",
"html": "pug",
"style": "less"
"html": "html",
"style": "scss"
}
}
6 changes: 3 additions & 3 deletions lib/blueprints/component/index.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<template src="./{{name}}.component.{{ filesType.html }}"></template>
<script src="./{{name}}.component.{{ filesType.js }}"></script>
<style src="./{{name}}.component.{{ filesType.style }}" scoped lang="{{ filesType.style }}"></style>
<template src='./{{name}}.component.{{ filesType.html }}'></template>
<script src='./{{name}}.component.{{ filesType.js }}'></script>
<style src='./{{name}}.component.{{ filesType.style }}' scoped lang='{{ filesType.style }}'></style>

10 changes: 3 additions & 7 deletions lib/blueprints/component/temp.component.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
export default {
export default {
name: '{{name | kebabCase}}',
props: [],
mounted() {

mounted () {
},
data() {
data () {
return {

}
},
methods: {

},
computed: {

}
}

20 changes: 10 additions & 10 deletions lib/blueprints/component/temp.component.spec.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import Vue from 'vue';
import {{name | camelCase}}Component from './index.vue';
import Vue from 'vue'
import {{name | camelCase}}Component from './index.vue'

// Here are some Jasmine 2.0 tests, though you can
// use any test runner / assertion library combo you prefer
describe('{{name | camelCase}}Component', () => {
// Inspect the raw component options
it('has a created hook', () => {
// expect(typeof {{name | camelCase}}Component.created).toBe('function');
// expect(typeof {{name | camelCase}}Component.created).toBe('function')
})
// Evaluate the results of functions in
// the raw component options
it('sets the correct default data', () => {
// expect(typeof {{name | camelCase}}Component.data).toBe('function')
// const defaultData = {{name | camelCase}}Component.data();
// expect(defaultData.message).toBe('hello!');
// const defaultData = {{name | camelCase}}Component.data()
// expect(defaultData.message).toBe('hello!')
})
// Inspect the component instance on mount
it('correctly sets the message when created', () => {
// const vm = new Vue({{name | camelCase}}Component).$mount();
// expect(vm.message).toBe('bye!');
// const vm = new Vue({{name | camelCase}}Component).$mount()
// expect(vm.message).toBe('bye!')
})
// Mount an instance and inspect the render output
it('renders the correct message', () => {
// const Ctor = Vue.extend({{name | camelCase}}Component);
// const vm = new Ctor().$mount();
// expect(vm.$el.textContent).toBe('bye!');
// const Ctor = Vue.extend({{name | camelCase}}Component)
// const vm = new Ctor().$mount()
// expect(vm.$el.textContent).toBe('bye!')
})
})
5 changes: 2 additions & 3 deletions lib/blueprints/component/temp.sty.extension
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
.{{name | kebabCase}} {

}
.{{name | kebabCase}}
// styles