# weather-webapp **Repository Path**: liuhw/weather-webapp ## Basic Information - **Project Name**: weather-webapp - **Description**: 简单的天气app - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2018-12-19 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README > 模仿'米丫天气' ## 1. 改用'stylus' ## 2. 使用'stylus 全局变量' 在`build/utils.js的generateLoaders`中修改. 定义全局变量的文件配置 ``` const stylusOptions = { import: [path.join(__dirname, '../src/assets/style/theme.styl')], paths: [path.join(__dirname, '../src/assets/style/'), path.join(__dirname, '../')] } ``` 其中的`theme.styl`定义全局变量的文件 修改`stylus`的配置 ``` stylus: generateLoaders('stylus', stylusOptions), styl: generateLoaders('stylus', stylusOptions) ``` 使用时,直接在样式用引用定义的变量即可.