Skip to content

Commit

Permalink
chore: make taro-ui-demo can build
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfield550 committed Apr 5, 2020
1 parent 3b4fa76 commit e8a13a9
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 42 deletions.
33 changes: 17 additions & 16 deletions packages/taro-ui-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"name": "taro-ui-demo",
"version": "1.0.0",
"private": true,
"name": "taro-ui-demo",
"version": "3.0.0",
"description": "Taro UI demo",
"author": "O2Team <aotu.io>",
"homepage": "https://taro-ui.aotu.io",
"repository": {
"type": "git",
"url": "[email protected]:nervjs/taro-ui.git"
},
"license": "MIT",
"templateInfo": {
"name": "default",
"typescript": true,
Expand Down Expand Up @@ -31,31 +38,25 @@
"Android >= 4.1",
"ios >= 8"
],
"author": "",
"dependencies": {
"@babel/runtime": "^7.7.7",
"@tarojs/components": "3.0.0-beta.2",
"@tarojs/react": "3.0.0-beta.2",
"@tarojs/runtime": "3.0.0-beta.2",
"@tarojs/taro": "3.0.0-beta.2",
"@tarojs/react": "3.0.0-beta.2",
"react": "^16.10.0",
"react-dom": "^16.10.0",
"react": "^16.10.0"
"taro-ui": "^3.0.0-alpha.1"
},
"devDependencies": {
"@types/webpack-env": "^1.13.6",
"@types/react": "^16.0.0",
"@tarojs/mini-runner": "3.0.0-beta.2",
"@babel/core": "^7.8.0",
"@tarojs/cli": "^3.0.0-beta.2",
"@tarojs/mini-runner": "3.0.0-beta.2",
"@tarojs/webpack-runner": "3.0.0-beta.2",
"@types/react": "^16.0.0",
"@types/webpack-env": "^1.13.6",
"babel-preset-taro": "3.0.0-beta.2",
"eslint-config-taro": "3.0.0-beta.2",
"eslint": "^6.8.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react-hooks": "^1.6.1",
"stylelint": "9.3.0",
"@typescript-eslint/parser": "^2.x",
"@typescript-eslint/eslint-plugin": "^2.x",
"typescript": "^3.7.0"
"typescript": "~3.7.0"
}
}
13 changes: 13 additions & 0 deletions packages/taro-ui-demo/project.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"miniprogramRoot": "./dist",
"projectname": "taro-ui-demo",
"description": "Taro UI demo",
"appid": "touristappid",
"setting": {
"urlCheck": true,
"es6": false,
"postcss": false,
"minified": false
},
"compileType": "miniprogram"
}
2 changes: 1 addition & 1 deletion packages/taro-ui-demo/src/app.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./style/index.scss";
@import "~taro-ui/dist/style/index.scss";

#app {
background-color: #f8f8f8;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../../style/variables/default";
@import "~taro-ui/dist/style/variables/default";

.danger {
color: $color-error;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "../../../style/mixins/index.scss";
@import "../../../style/variables/default.scss";
@import "~taro-ui/dist/style/mixins/index.scss";
@import "~taro-ui/dist/style/variables/default.scss";

.activity-indicator-page .panel__content {
.example-item {
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-ui-demo/src/pages/layout/flex/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "../../../style/variables/default.scss";
@import "~taro-ui/dist/style/variables/default.scss";
@import '~taro-ui/dist/style/components/flex.scss';

.flex-page .at-row {
margin-bottom: 40px;
Expand Down
1 change: 0 additions & 1 deletion packages/taro-ui-demo/src/pages/layout/flex/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import { View } from '@tarojs/components'
import Taro from '@tarojs/taro'
import DocsHeader from '../../components/doc-header'
import '../../../style/components/flex.scss'
import './index.scss'

export default class FlexPage extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-ui-demo/src/pages/panel/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../../style/mixins/index.scss';
@import '../../style/variables/default.scss';
@import '~taro-ui/dist/style/mixins/index.scss';
@import '~taro-ui/dist/style/variables/default.scss';

/**
* 分类页样式
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-ui-demo/src/pages/theme/index.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import "../../style/index.scss";
@import "~taro-ui/dist/style/index.scss";
1 change: 1 addition & 0 deletions packages/taro-ui-demo/src/pages/view/article/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '~taro-ui/dist/style/components/article.scss';
1 change: 0 additions & 1 deletion packages/taro-ui-demo/src/pages/view/article/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react'
import { Image, View } from '@tarojs/components'
import Taro from '@tarojs/taro'
import DocsHeader from '../../components/doc-header'
import '../../../style/components/article.scss'
import './index.scss'

export default class ArticlePage extends React.Component {
Expand Down
14 changes: 2 additions & 12 deletions packages/taro-ui-demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
{
"compileOnSave": false,
"extends": "../../tsconfig",
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"experimentalDecorators": true,
"jsx": "react",
"jsxFactory": "React.createElement",
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "lib",
"preserveConstEnums": true,
"removeComments": false,
"resolveJsonModule": true,
"rootDir": ".",
"sourceMap": true,
"strictNullChecks": true,
"skipLibCheck": false,
"target": "es2017",
"typeRoots": [
"node_modules/@types",
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "./tsconfig.build",
"compilerOptions": {
"baseUrl": "./packages",
"paths": {
"taro-ui": ["taro-ui/src/index.ts"]
}
"baseUrl": "./packages"
}
}

0 comments on commit e8a13a9

Please sign in to comment.