-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #395 from platanus/shakapack
Shakapack
- Loading branch information
Showing
26 changed files
with
355 additions
and
200 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
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
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,35 +1,27 @@ | ||
<script setup lang="ts"> | ||
interface Props { | ||
test?: string | ||
testNumber?: number | ||
testObject?: {[key: string]: string}, | ||
testList?: number[], | ||
} | ||
const props = withDefaults( | ||
defineProps<Props>(), | ||
{ | ||
test: undefined, | ||
testNumber: 0, | ||
testObject: undefined, | ||
testList: undefined, | ||
}, | ||
); | ||
const message = 'Hello World'; | ||
</script> | ||
|
||
<template> | ||
<div> | ||
I am a Vue Component {{ test }} {{ message }} | ||
I am a Vue Component {{ props.test }} {{ message }} | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
test: { | ||
type: String, | ||
default: '', | ||
}, | ||
testNumber: { | ||
type: Number, | ||
default: 0, | ||
}, | ||
testObject: { | ||
type: Object, | ||
default: null, | ||
}, | ||
testList: { | ||
type: Array, | ||
default: null, | ||
}, | ||
}, | ||
data() { | ||
return { | ||
message: 'Hello World', | ||
}; | ||
}, | ||
}; | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...tassium/assets/app/javascript/app.spec.js → ...ets/app/javascript/components/app.spec.ts
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,9 @@ | ||
<script setup lang="ts"> | ||
const message = 'Hello Vue!'; | ||
</script> | ||
|
||
<template> | ||
<div id="app"> | ||
<p class="text-center text-lg">{{ message }}</p> | ||
</div> | ||
</template> |
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 @@ | ||
declare module '*.vue' { | ||
import type { DefineComponent } from 'vue' | ||
const component: DefineComponent<{}, {}, any> | ||
export default component | ||
} |
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 @@ | ||
module.exports = { | ||
resolve: { | ||
extensions: ['.css', '.scss'] | ||
} | ||
} |
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 @@ | ||
const vueConfig = require('./vue'); | ||
const cssConfig = require('./css'); | ||
const jQueryConfig = require('./jquery'); | ||
const typescriptConfig = require('./typescript'); | ||
|
||
module.exports = { | ||
vueConfig, | ||
cssConfig, | ||
jQueryConfig, | ||
typescriptConfig, | ||
}; |
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 @@ | ||
const webpack = require('webpack'); | ||
|
||
module.exports = { | ||
plugins: [ | ||
new webpack.ProvidePlugin({ | ||
$: 'jquery', | ||
jQuery: 'jquery', | ||
"window.jQuery":"jquery" | ||
}) | ||
], | ||
} |
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,32 @@ | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
|
||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
loader: 'ts-loader', | ||
exclude: /node_modules/, | ||
options: { | ||
appendTsSuffixTo: [/\.vue$/], | ||
transpileOnly: true, | ||
}, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.ts'], | ||
}, | ||
plugins: [ | ||
new ForkTsCheckerWebpackPlugin({ | ||
typescript: { | ||
extensions: { | ||
vue: { | ||
enabled: true, | ||
compiler: '@vue/compiler-sfc', | ||
}, | ||
}, | ||
}, | ||
}), | ||
], | ||
}; |
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,19 @@ | ||
const { VueLoaderPlugin } = require('vue-loader') | ||
|
||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader' | ||
} | ||
] | ||
}, | ||
plugins: [new VueLoaderPlugin()], | ||
resolve: { | ||
extensions: ['.vue'], | ||
alias: { | ||
'vue$': 'vue/dist/vue.esm-bundler.js', | ||
} | ||
}, | ||
} |
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,4 @@ | ||
const { webpackConfig, merge } = require('shakapacker'); | ||
const { vueConfig, cssConfig, jQueryConfig, typescriptConfig } = require('./rules'); | ||
|
||
module.exports = merge(typescriptConfig, cssConfig, jQueryConfig, webpackConfig); |
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,31 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "ESNext", | ||
"moduleResolution": "Node", | ||
"resolveJsonModule": true, | ||
"useDefineForClassFields": true, | ||
"jsx": "preserve", | ||
"noImplicitThis": true, | ||
"strict": true, | ||
"isolatedModules": true, | ||
"preserveValueImports": true, | ||
"importsNotUsedAsValues": "error", | ||
"target": "esnext", | ||
"allowJs": true, | ||
|
||
// Recommended | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
// See <https://github.com/vuejs/vue-cli/pull/5688> | ||
"skipLibCheck": true, | ||
"baseUrl": "app/javascript/", | ||
"types": ["@types/jest", "@types/node"], | ||
}, | ||
"include": [ | ||
"app/javascript/**/*.ts", | ||
"app/javascript/**/*.vue" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
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
Oops, something went wrong.