Skip to content

Commit

Permalink
fix: sass头部添加变量引用链接
Browse files Browse the repository at this point in the history
  • Loading branch information
taoyage committed Jun 26, 2022
1 parent 36410b1 commit 9f6fa8b
Show file tree
Hide file tree
Showing 23 changed files with 5,879 additions and 604 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
esm
cjs
lib
es
.idea/
6,442 changes: 5,843 additions & 599 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A react mobile components lib",
"main": "lib/index.js",
"module": "es/index.js",
"typings": "lib/index.d.ts",
"typings": "lib/typing/index.d.ts",
"scripts": {
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
Expand Down Expand Up @@ -56,6 +56,7 @@
"babel-loader": "^8.2.5",
"chalk": "^4.0.0",
"gulp-if": "^3.0.0",
"gulp-image": "^5.1.0",
"gulp-sass": "^5.1.0",
"gulp-style-aliases": "^1.1.11",
"gulp-ts-alias": "^1.3.0",
Expand Down
Binary file added packages/.DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions packages/button/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-button {
color: $ygm-color-text;
background-color: $ygm-color-white;
Expand Down
2 changes: 2 additions & 0 deletions packages/card/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-card {
background: $ygm-color-white;
border-radius: 13px;
Expand Down
2 changes: 2 additions & 0 deletions packages/countdown/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-countdown {
display: flex;
align-items: center;
Expand Down
3 changes: 2 additions & 1 deletion packages/image/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import useIntersectionObserver from '@/hooks/useIntersectionObserver';

import placeholderImg from './placeholder.png';
// @ts-ignore
import placeholderImg from '@/image/placeholder.png';

export interface ImageProps {
src: string;
Expand Down
2 changes: 2 additions & 0 deletions packages/mask/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-mask {
z-index: 999;
position: fixed;
Expand Down
2 changes: 2 additions & 0 deletions packages/nav-bar/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-nav-bar {
height: 45px;
border-bottom: none;
Expand Down
2 changes: 2 additions & 0 deletions packages/popup/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-popup {
z-index: 1001;
position: fixed;
Expand Down
2 changes: 2 additions & 0 deletions packages/pull-to-refresh/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-pull-to-refresh {
overflow: hidden;
user-select: none;
Expand Down
2 changes: 1 addition & 1 deletion packages/space/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import cx from 'classnames';

import './index.scss';
import './styles/index.scss';

export interface SpaceProps {
/** 间距方向 */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

$class-prefix-space: 'ygm-space';

.#{$class-prefix-space} {
Expand Down
2 changes: 2 additions & 0 deletions packages/spinner-loading/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-spinner {
&-loading {
border-top: 1px solid;
Expand Down
2 changes: 2 additions & 0 deletions packages/swiper/styles/swiper-item.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-swiper-item {
display: block;
width: 100%;
Expand Down
2 changes: 2 additions & 0 deletions packages/swiper/styles/swiper-page-indicator.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-swiper-page-indicator {
display: flex;
width: auto;
Expand Down
2 changes: 2 additions & 0 deletions packages/swiper/styles/swiper.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-swiper {
width: 100%;
height: auto;
Expand Down
2 changes: 2 additions & 0 deletions packages/toast/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../styles/variable.scss';

.ygm-toast {
position: fixed;
top: 0;
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion scripts/utils/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = function (opts) {
base: srcPath,
})
.pipe(gulpIf((f) => isTsFile(f.path), gulpAlias({ configuration: tsConfig })))
.pipe(gulpIf((f) => isStyleFile(f.path), gulpAlias({ configuration: tsConfig })))
.pipe(
gulpIf(
(f) => isStyleFile(f.path),
Expand Down Expand Up @@ -101,7 +102,7 @@ module.exports = function (opts) {
base: srcPath,
})
.pipe(gulpIf((f) => isTsFile(f.path), gulpAlias({ configuration: tsConfig })))
.pipe(gulpIf((f) => isTsFile(f.path), gulpTs(tsConfig)))
.pipe(gulpIf((f) => isTsFile(f.path), gulpTs({ ...tsConfig, files: [path.join(cwd, 'typings.d.ts')] })))
.pipe(vfs.dest(targetPath));
}

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
},
"include": ["packages", "stories"],
"exclude": ["node_modules"],
"files": ["./typings.d.ts"]
"files": ["./packages/typings/index.d.ts"],
"typeRoots": ["./packages/typings"]
}

0 comments on commit 9f6fa8b

Please sign in to comment.