-
-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
huangjianke
committed
Jan 9, 2019
0 parents
commit 4f40991
Showing
20 changed files
with
11,553 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": ["taro"], | ||
"rules": { | ||
"no-unused-vars": ["error", { "varsIgnorePattern": "Taro" }], | ||
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".tsx"] }] | ||
}, | ||
"parser": "babel-eslint" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dist/ | ||
.temp/ | ||
.rn_temp/ | ||
node_modules/ | ||
.DS_Store | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
registry=https://r.cnpmjs.org | ||
disturl=https://r.cnpmjs.org/node | ||
sass_binary_site=https://r.cnpmjs.org/node-sass/ | ||
fse_binary_host_mirror=https://r.cnpmjs.org/fsevents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
env: { | ||
NODE_ENV: '"development"' | ||
}, | ||
defineConstants: { | ||
}, | ||
weapp: {}, | ||
h5: {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
const config = { | ||
projectName: 'Gitter', | ||
date: '2019-1-9', | ||
designWidth: 750, | ||
deviceRatio: { | ||
'640': 2.34 / 2, | ||
'750': 1, | ||
'828': 1.81 / 2 | ||
}, | ||
sourceRoot: 'src', | ||
outputRoot: 'dist', | ||
plugins: { | ||
babel: { | ||
sourceMap: true, | ||
presets: [ | ||
'env' | ||
], | ||
plugins: [ | ||
'transform-decorators-legacy', | ||
'transform-class-properties', | ||
'transform-object-rest-spread' | ||
] | ||
} | ||
}, | ||
defineConstants: { | ||
}, | ||
copy: { | ||
patterns: [ | ||
], | ||
options: { | ||
} | ||
}, | ||
weapp: { | ||
module: { | ||
postcss: { | ||
autoprefixer: { | ||
enable: true, | ||
config: { | ||
browsers: [ | ||
'last 3 versions', | ||
'Android >= 4.1', | ||
'ios >= 8' | ||
] | ||
} | ||
}, | ||
pxtransform: { | ||
enable: true, | ||
config: { | ||
|
||
} | ||
}, | ||
url: { | ||
enable: true, | ||
config: { | ||
limit: 10240 // 设定转换尺寸上限 | ||
} | ||
}, | ||
cssModules: { | ||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true | ||
config: { | ||
namingPattern: 'module', // 转换模式,取值为 global/module | ||
generateScopedName: '[name]__[local]___[hash:base64:5]' | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
h5: { | ||
publicPath: '/', | ||
staticDirectory: 'static', | ||
module: { | ||
postcss: { | ||
autoprefixer: { | ||
enable: true, | ||
config: { | ||
browsers: [ | ||
'last 3 versions', | ||
'Android >= 4.1', | ||
'ios >= 8' | ||
] | ||
} | ||
}, | ||
cssModules: { | ||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true | ||
config: { | ||
namingPattern: 'module', // 转换模式,取值为 global/module | ||
generateScopedName: '[name]__[local]___[hash:base64:5]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
module.exports = function (merge) { | ||
if (process.env.NODE_ENV === 'development') { | ||
return merge({}, config, require('./dev')) | ||
} | ||
return merge({}, config, require('./prod')) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
env: { | ||
NODE_ENV: '"production"' | ||
}, | ||
defineConstants: { | ||
}, | ||
weapp: {}, | ||
h5: {} | ||
} |
Oops, something went wrong.