mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-20 11:30:43 -05:00
refactor: automatically inject @/style/imports using import option provided by stylus loader (#2515)
This commit is contained in:
committed by
Haoqun Jiang
parent
9357a608f2
commit
30d46ffc30
@@ -34,8 +34,6 @@ export default {
|
||||
</style>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.app
|
||||
display flex
|
||||
flex-direction column
|
||||
|
||||
@@ -39,8 +39,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.loading
|
||||
v-box()
|
||||
box-center()
|
||||
|
||||
@@ -38,8 +38,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.configuration-item
|
||||
padding $padding-item
|
||||
|
||||
|
||||
@@ -31,8 +31,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.content
|
||||
display flex
|
||||
align-items center
|
||||
|
||||
@@ -25,8 +25,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.content-view
|
||||
height 100%
|
||||
|
||||
|
||||
@@ -103,8 +103,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
status-color($color)
|
||||
.name
|
||||
color $color
|
||||
|
||||
@@ -76,8 +76,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.file-diff-change
|
||||
font-family $font-mono
|
||||
font-size 12px
|
||||
|
||||
@@ -22,8 +22,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.file-diff-chunk
|
||||
.changes
|
||||
overflow-x auto
|
||||
|
||||
@@ -247,8 +247,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.file-diff-view
|
||||
v-box()
|
||||
height 100%
|
||||
|
||||
@@ -399,8 +399,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.toolbar
|
||||
padding $padding-item 0
|
||||
h-box()
|
||||
|
||||
@@ -38,8 +38,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.folder-explorer-item
|
||||
padding $padding-item
|
||||
h-box()
|
||||
|
||||
@@ -55,8 +55,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.instant-search-pagination
|
||||
margin $padding-item 0
|
||||
.content
|
||||
|
||||
@@ -98,8 +98,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.item-logo
|
||||
margin-right $padding-item
|
||||
position relative
|
||||
|
||||
@@ -60,8 +60,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.list-item-info
|
||||
v-box()
|
||||
align-items stretch
|
||||
|
||||
@@ -34,8 +34,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.logger-message
|
||||
h-box()
|
||||
align-items baseline
|
||||
|
||||
@@ -111,8 +111,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.logger-view
|
||||
background $vue-ui-color-light
|
||||
height 174px
|
||||
|
||||
@@ -26,8 +26,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.nav-content
|
||||
width 100%
|
||||
height 100%
|
||||
|
||||
@@ -46,8 +46,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.nav-list
|
||||
overflow-x hidden
|
||||
overflow-y auto
|
||||
|
||||
@@ -147,8 +147,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.npm-package-search
|
||||
height 100%
|
||||
display flex
|
||||
|
||||
@@ -111,8 +111,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.package-search-item
|
||||
padding $padding-item
|
||||
h-box()
|
||||
|
||||
@@ -73,8 +73,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.loading-screen
|
||||
position absolute
|
||||
z-index 900
|
||||
|
||||
@@ -138,8 +138,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-dependency-item
|
||||
padding $padding-item
|
||||
cursor default
|
||||
|
||||
@@ -32,8 +32,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-feature-item
|
||||
.vue-ui-switch
|
||||
padding $padding-item
|
||||
|
||||
@@ -165,8 +165,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-nav
|
||||
background $vue-ui-color-light-neutral
|
||||
.vue-ui-dark-mode &
|
||||
|
||||
@@ -86,8 +86,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
$bg = $vue-ui-color-light-neutral
|
||||
$bg-dark = $vue-ui-color-dark
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
</template>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-nav-more
|
||||
.vue-ui-dropdown.open .dropdown-trigger .vue-ui-button
|
||||
&,
|
||||
|
||||
@@ -138,8 +138,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-plugin-item
|
||||
padding $padding-item
|
||||
cursor default
|
||||
|
||||
@@ -48,8 +48,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-preset-item
|
||||
padding $padding-item
|
||||
padding-left 0
|
||||
|
||||
@@ -145,8 +145,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-select-list
|
||||
height 100%
|
||||
overflow-y auto
|
||||
|
||||
@@ -83,8 +83,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.content
|
||||
padding $padding-item
|
||||
display grid
|
||||
|
||||
@@ -155,8 +155,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
bullet-color($color)
|
||||
.bullet
|
||||
background-color $color
|
||||
|
||||
@@ -34,8 +34,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
@import "~@/style/imports"
|
||||
|
||||
.prompt
|
||||
list-item()
|
||||
.prompt-content
|
||||
|
||||
@@ -59,8 +59,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.prompt-content
|
||||
v-box()
|
||||
align-items stretch
|
||||
|
||||
@@ -53,8 +53,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.color-preview
|
||||
padding-left $padding-item
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.prompt-confirm
|
||||
.vue-ui-switch
|
||||
padding $padding-item
|
||||
|
||||
@@ -19,8 +19,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.prompt-error
|
||||
padding 0 $padding-item $padding-item
|
||||
|
||||
|
||||
@@ -73,8 +73,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.group
|
||||
margin-bottom ($padding-item * 2)
|
||||
|
||||
|
||||
@@ -184,8 +184,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.status-bar
|
||||
position relative
|
||||
z-index 1
|
||||
|
||||
@@ -58,8 +58,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.step-wizard
|
||||
box-sizing border-box
|
||||
|
||||
|
||||
@@ -93,8 +93,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.suggestions
|
||||
h-box()
|
||||
</style>
|
||||
|
||||
@@ -105,8 +105,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.suggestion-details
|
||||
padding ($padding-item * 2 - 8px) ($padding-item * 2)
|
||||
box-sizing border-box
|
||||
|
||||
@@ -81,8 +81,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.task-item
|
||||
padding $padding-item
|
||||
|
||||
|
||||
@@ -230,8 +230,6 @@ export default {
|
||||
</style>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.terminal-view
|
||||
v-box()
|
||||
align-items stretch
|
||||
|
||||
@@ -173,8 +173,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.top-bar
|
||||
background $vue-ui-color-light
|
||||
padding $padding-item
|
||||
|
||||
@@ -24,8 +24,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.view-badge
|
||||
.content
|
||||
font-size 12px
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@import '~prismjs/themes/prism.css'
|
||||
@import 'imports'
|
||||
|
||||
html,
|
||||
body,
|
||||
@@ -166,7 +165,7 @@ ansi-colors('white', $vue-ui-color-light)
|
||||
.vue-ui-dark-mode
|
||||
.token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol, .token.deleted
|
||||
color lighten(#905, 40%)
|
||||
|
||||
|
||||
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted
|
||||
color lighten(#690, 40%)
|
||||
|
||||
@@ -178,6 +177,6 @@ ansi-colors('white', $vue-ui-color-light)
|
||||
|
||||
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string
|
||||
color lighten(#9a6e3a, 20%)
|
||||
|
||||
|
||||
.token.punctuation
|
||||
color lighten(#999, 20%)
|
||||
|
||||
@@ -53,8 +53,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.about
|
||||
padding 42px
|
||||
max-width 840px
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
</template>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.not-found
|
||||
v-box()
|
||||
box-center()
|
||||
|
||||
@@ -175,8 +175,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-configuration-details
|
||||
v-box()
|
||||
align-items stretch
|
||||
|
||||
@@ -99,8 +99,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-configurations
|
||||
.content-view /deep/ > .content
|
||||
overflow-y hidden
|
||||
|
||||
@@ -688,8 +688,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-create
|
||||
display grid
|
||||
grid-template-columns 1fr
|
||||
|
||||
@@ -209,8 +209,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-dependencies
|
||||
.content-view /deep/ > .content
|
||||
overflow-y auto
|
||||
|
||||
@@ -41,8 +41,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-home
|
||||
display flex
|
||||
flex-direction column
|
||||
|
||||
@@ -114,8 +114,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-plugins
|
||||
.content-view /deep/ > .content
|
||||
overflow-y auto
|
||||
|
||||
@@ -255,8 +255,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-plugins-add
|
||||
display grid
|
||||
grid-template-columns 1fr
|
||||
|
||||
@@ -171,8 +171,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.folder-explorer
|
||||
height 100%
|
||||
|
||||
|
||||
@@ -334,8 +334,6 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import "~@/style/imports"
|
||||
|
||||
.project-task-details
|
||||
v-box()
|
||||
align-items stretch
|
||||
|
||||
@@ -23,5 +23,13 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
)
|
||||
},
|
||||
|
||||
css: {
|
||||
loaderOptions: {
|
||||
stylus: {
|
||||
import: ['~@/style/imports']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user