Skip to content

Commit

Permalink
Merge pull request #8 from justgeek/development
Browse files Browse the repository at this point in the history
[1.2.1] clean up auto imports
  • Loading branch information
justgeek authored Jul 15, 2020
2 parents bbc2c8a + fb491e9 commit a3274dd
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 17 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Hotfix] 1.2.1
### Changed
- Commented unnecessary imports to avoid lint warnings in some projects
- Removed Vue import if classExtension is used

## [Release] 1.2.0
### Added
- Add support for custom class extension for pages (MyPage extends MyCustomComponent)
Expand Down
6 changes: 3 additions & 3 deletions lib/blueprints/component/temp.actions.extension
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Commit } from 'vuex';
import { {{name | camelCase}}Mutations } from './{{name}}.mutations';
import { {{name | camelCase}}Store } from './{{name}}.store';
//import { Commit } from 'vuex';
//import { {{name | camelCase}}Mutations } from './{{name}}.mutations';
//import { {{name | camelCase}}Store } from './{{name}}.store';

export const namespace = '{{name | camelCase}}Store';

Expand Down
2 changes: 1 addition & 1 deletion lib/blueprints/component/temp.getters.extension
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { {{name | PascalCase}}State } from './{{ name }}.store';
//import { {{name | PascalCase}}State } from './{{ name }}.store';

export const {{name | camelCase}}Getters = {

Expand Down
2 changes: 1 addition & 1 deletion lib/blueprints/component/temp.mutations.extension
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { {{name | PascalCase}}State } from './{{name}}.store';
//import { {{name | PascalCase}}State } from './{{name}}.store';

export const {{name | camelCase}}Mutations = {

Expand Down
2 changes: 1 addition & 1 deletion lib/blueprints/component/temp.script.extension
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Vue from 'vue';
{% if classExtension %}{% else %}import Vue from 'vue';{% endif %}
import Component from 'vue-class-component';

@Component({
Expand Down
1 change: 0 additions & 1 deletion lib/blueprints/component/temp.test.extension
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Vue from 'vue';
import { mount } from '@vue/test-utils'
import {{name | PascalCase}}{{postfix | PascalCase}} from '../{{name}}{% if postfix %}.{{postfix}}{% endif %}';

Expand Down
29 changes: 27 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-generate-component-x",
"version": "1.2.0",
"version": "1.2.1",
"description": "Vue js component generator. Supports creating files for vuex store, and actions",
"main": "lib/vgc.js",
"homepage": "https://github.com/justgeek/vue-generate-component",
Expand Down
1 change: 0 additions & 1 deletion showroom/path/to/my-page/__tests__/my-page.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Vue from 'vue';
import { mount } from '@vue/test-utils'
import MyPagePage from '../my-page.page';

Expand Down
2 changes: 1 addition & 1 deletion showroom/path/to/my-page/my-page.page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Vue from 'vue';

import Component from 'vue-class-component';

@Component({
Expand Down
6 changes: 3 additions & 3 deletions showroom/path/to/my-page/store/my-page.actions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Commit } from 'vuex';
import { myPageMutations } from './my-page.mutations';
import { myPageStore } from './my-page.store';
//import { Commit } from 'vuex';
//import { myPageMutations } from './my-page.mutations';
//import { myPageStore } from './my-page.store';

export const namespace = 'myPageStore';

Expand Down
2 changes: 1 addition & 1 deletion showroom/path/to/my-page/store/my-page.getters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MyPageState } from './my-page.store';
//import { MyPageState } from './my-page.store';

export const myPageGetters = {

Expand Down
2 changes: 1 addition & 1 deletion showroom/path/to/my-page/store/my-page.mutations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MyPageState } from './my-page.store';
//import { MyPageState } from './my-page.store';

export const myPageMutations = {

Expand Down

0 comments on commit a3274dd

Please sign in to comment.