first commit

This commit is contained in:
DanielRamirezGe
2020-01-14 20:43:08 -06:00
parent 3557894f7f
commit 5eecfbf6cd
26326 changed files with 2434803 additions and 0 deletions
@@ -0,0 +1,7 @@
module.exports = {
presets: [
['@vue/app', {
polyfills: []
}]
]
}
@@ -0,0 +1,7 @@
module.exports = {
presets: [
['@vue/cli-plugin-babel/preset', {
polyfills: []
}]
]
}
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@vue/app']
}
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@vue/cli-plugin-babel/preset']
}
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/app"]
}
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
}
@@ -0,0 +1,9 @@
const config = {
presets: [
[require('@vue/babel-preset-app'), {
polyfills: []
}]
]
}
module.exports = config
@@ -0,0 +1,9 @@
const config = {
presets: [
[require('@vue/cli-plugin-babel/preset'), {
polyfills: []
}]
]
}
module.exports = config
@@ -0,0 +1,3 @@
module.exports = {
presets: [`@vue/app`]
}
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@vue/cli-plugin-babel/preset']
}
+41
View File
@@ -0,0 +1,41 @@
module.exports = function (fileInfo, api) {
const j = api.jscodeshift
const root = j(fileInfo.source)
const useDoubleQuote = root.find(j.Literal).some(({ node }) => node.raw.startsWith('"'))
root
.find(j.Literal, { value: '@vue/app' })
.replaceWith(j.stringLiteral('@vue/cli-plugin-babel/preset'))
root
.find(j.Literal, { value: '@vue/babel-preset-app' })
.replaceWith(j.stringLiteral('@vue/cli-plugin-babel/preset'))
const templateLiterals = root
.find(j.TemplateLiteral, {
expressions: { length: 0 }
})
templateLiterals
.find(j.TemplateElement, {
value: {
cooked: '@vue/app'
}
})
.closest(j.TemplateLiteral)
.replaceWith(j.stringLiteral('@vue/cli-plugin-babel/preset'))
templateLiterals
.find(j.TemplateElement, {
value: {
cooked: '@vue/babel-preset-app'
}
})
.closest(j.TemplateLiteral)
.replaceWith(j.stringLiteral('@vue/cli-plugin-babel/preset'))
return root.toSource({
lineTerminator: '\n',
quote: useDoubleQuote ? 'double' : 'single'
})
}