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

Commit

Permalink
Merge pull request #154 from alvarosaburido/feature/add-aliases-to-ro…
Browse files Browse the repository at this point in the history
…llup

feat(build): add alias to rollup
  • Loading branch information
alvarosabu authored Oct 3, 2020
2 parents f610580 + b1afc25 commit 45cec79
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 22 deletions.
4 changes: 2 additions & 2 deletions dev/typescript/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ import {
pattern,
ColorInput,
NumberInput,
} from '../../src';
/* } from '../../dist/as-dynamic-forms.esm'; */
/* } from '../../src'; */
} from '../../dist/as-dynamic-forms.esm';
export default defineComponent({
name: 'app',
setup() {
Expand Down
4 changes: 2 additions & 2 deletions dev/typescript/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { createApp } from 'vue';
import App from './App.vue';
import './styles/main.scss';

import { createDynamicForms } from '../../src';
// import { createDynamicForms } from '../../src';

// import { createDynamicForms } from '../../dist/as-dynamic-forms.esm';
import { createDynamicForms } from '../../dist/as-dynamic-forms.esm';

const VueDynamicForms = createDynamicForms({
autoValidate: true,
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
},
"devDependencies": {
"@microsoft/api-extractor": "^7.10.1",
"@rollup/plugin-alias": "^3.1.1",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
Expand Down
4 changes: 4 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import commonjs from '@rollup/plugin-commonjs';
import { terser } from 'rollup-plugin-terser';
import ts from 'rollup-plugin-typescript2';
import vue from 'rollup-plugin-vue';
import alias from '@rollup/plugin-alias';

import pkg from './package.json';
const name = 'as-dynamic-forms';
Expand Down Expand Up @@ -89,6 +90,9 @@ function createConfig(format, output, plugins = []) {
// used alone.
external,
plugins: [
alias({
entries: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
}),
tsPlugin,
vue(),
createReplacePlugin(
Expand Down
4 changes: 2 additions & 2 deletions src/components/checkbox-input/CheckboxInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { defineComponent, h, PropType } from 'vue';
import { FormControl, CheckboxInput } from '../../core/models';
import { useInputEvents } from '../../composables/input-events';
import { FormControl, CheckboxInput } from '@/core/models';
import { useInputEvents } from '@/composables/input-events';
const props = {
control: Object as PropType<FormControl<CheckboxInput>>,
Expand Down
4 changes: 2 additions & 2 deletions src/components/dynamic-form/DynamicForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import {
import { DynamicForm } from './form';
import DynamicInput from '../dynamic-input/DynamicInput.vue';
import { InputBase, FormControl } from '../../core/models';
import { dynamicFormsSymbol } from '../../useApi';
import { InputBase, FormControl } from '@/core/models';
import { dynamicFormsSymbol } from '@/useApi';
/* import { warn } from '../../core/utils/warning';
*/
const props = {
Expand Down
8 changes: 4 additions & 4 deletions src/components/dynamic-input/DynamicInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import {
RadioInput,
CheckboxInput,
TextAreaInput,
} from '../../core/models';
} from '@/core/models';
import { isEmpty, entries, values, keys } from '../../core/utils/helpers';
import { useInputEvents } from '../../composables/input-events';
import { dynamicFormsSymbol } from '../../useApi';
import { isEmpty, entries, values, keys } from '@/core/utils/helpers';
import { useInputEvents } from '@/composables/input-events';
import { dynamicFormsSymbol } from '@/useApi';
const components = {
TextInputComponent,
Expand Down
4 changes: 2 additions & 2 deletions src/components/number-input/NumberInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { defineComponent, h, PropType } from 'vue';
import { FormControl, NumberInput } from '../../core/models';
import { useInputEvents } from '../../composables/input-events';
import { FormControl, NumberInput } from '@/core/models';
import { useInputEvents } from '@/composables/input-events';
const props = {
control: Object as PropType<FormControl<NumberInput>>,
Expand Down
4 changes: 2 additions & 2 deletions src/components/radio-input/RadioInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { defineComponent, h, PropType } from 'vue';
import { FormControl, RadioInput } from '../../core/models';
import { useInputEvents } from '../../composables/input-events';
import { FormControl, RadioInput } from '@/core/models';
import { useInputEvents } from '@/composables/input-events';
const props = {
control: Object as PropType<FormControl<RadioInput>>,
Expand Down
4 changes: 2 additions & 2 deletions src/components/select-input/SelectInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { defineComponent, h, PropType } from 'vue';
import { FormControl, SelectInput } from '../../core/models';
import { useInputEvents } from '../../composables/input-events';
import { FormControl, SelectInput } from '@/core/models';
import { useInputEvents } from '@/composables/input-events';
const props = {
control: Object as PropType<FormControl<SelectInput>>,
Expand Down
4 changes: 2 additions & 2 deletions src/components/text-area-input/TextAreaInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { defineComponent, h, PropType } from 'vue';
import { FormControl, TextAreaInput } from '../../core/models';
import { useInputEvents } from '../../composables/input-events';
import { FormControl, TextAreaInput } from '@/core/models';
import { useInputEvents } from '@/composables/input-events';
const props = {
control: Object as PropType<FormControl<TextAreaInput>>,
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/text-input/TextInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
PasswordInput,
TextInput,
UrlInput,
} from '../../core/models';
import { useInputEvents } from '../../composables/input-events';
} from '@/core/models';
import { useInputEvents } from '@/composables/input-events';
const props = {
control: Object as PropType<
Expand Down

0 comments on commit 45cec79

Please sign in to comment.