-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'NervJS:main' into fix/tsconfig
- Loading branch information
Showing
1,164 changed files
with
50,570 additions
and
9,141 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
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
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
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
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
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
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
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
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
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
2 changes: 1 addition & 1 deletion
2
...ugin_compile_mode/tests/__swc_snapshots__/src/tests/attributes.rs/should_handle_events.js
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
4 changes: 2 additions & 2 deletions
4
...compile_mode/tests/__swc_snapshots__/src/tests/attributes.rs/should_turn_dynamic_attrs.js
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
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
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
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,13 @@ | ||
{ | ||
"extends": ["taro/react"], | ||
"rules": { | ||
"react/jsx-uses-react": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/no-unused-expressions": "off", | ||
"import/first": "off", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/no-shadow": "off", | ||
"react/forbid-elements": "off" | ||
} | ||
} |
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,7 @@ | ||
dist/ | ||
deploy_versions/ | ||
.temp/ | ||
.rn_temp/ | ||
node_modules/ | ||
.DS_Store | ||
.swc |
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,14 @@ | ||
{ | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"useTabs": false, | ||
"tabWidth": 2, | ||
"semi": false, | ||
"quoteProps": "as-needed", | ||
"trailingComma": "es5", | ||
"bracketSpacing": true, | ||
"jsxSingleQuote": true, | ||
"jsxBracketSameLine": false, | ||
"arrowParens": "always", | ||
"endOfLine": "auto" | ||
} |
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,10 @@ | ||
// babel-preset-taro 更多选项和默认值: | ||
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md | ||
module.exports = { | ||
presets: [ | ||
['taro', { | ||
framework: 'react', | ||
ts: true | ||
}] | ||
] | ||
} |
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: { | ||
}, | ||
mini: {}, | ||
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,96 @@ | ||
const path = require('path') | ||
|
||
const config = { | ||
projectName: 'mini-program-example', | ||
date: '2023-6-15', | ||
designWidth: 750, | ||
deviceRatio: { | ||
640: 2.34 / 2, | ||
750: 1, | ||
828: 1.81 / 2 | ||
}, | ||
sourceRoot: 'src', | ||
outputRoot: `dist/spa/main`, | ||
plugins: [], | ||
alias: { | ||
'@/util': path.resolve(__dirname, '..', 'src/util'), | ||
'@/styles': path.resolve(__dirname, '..', 'src/styles'), | ||
'@/assets': path.resolve(__dirname, '..', 'src/assets'), | ||
'@/components': path.resolve(__dirname, '..', 'src/components'), | ||
}, | ||
defineConstants: { | ||
}, | ||
copy: { | ||
patterns: [ | ||
], | ||
options: { | ||
} | ||
}, | ||
framework: 'react', | ||
compiler: 'webpack5', | ||
cache: { | ||
enable: false // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache | ||
}, | ||
mini: { | ||
postcss: { | ||
pxtransform: { | ||
enable: true, | ||
config: { | ||
|
||
} | ||
}, | ||
url: { | ||
enable: true, | ||
config: { | ||
limit: 1024 // 设定转换尺寸上限 | ||
} | ||
}, | ||
cssModules: { | ||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true | ||
config: { | ||
namingPattern: 'module', // 转换模式,取值为 global/module | ||
generateScopedName: '[name]__[local]___[hash:base64:5]' | ||
} | ||
} | ||
}, | ||
imageUrlLoaderOption:{ | ||
limit:8192 | ||
} | ||
}, | ||
h5: { | ||
publicPath: '/spa/main/', | ||
staticDirectory: 'static', | ||
postcss: { | ||
autoprefixer: { | ||
enable: true, | ||
config: { | ||
} | ||
}, | ||
cssModules: { | ||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true | ||
config: { | ||
namingPattern: 'module', // 转换模式,取值为 global/module | ||
generateScopedName: '[name]__[local]___[hash:base64:5]' | ||
} | ||
} | ||
}, | ||
imageUrlLoaderOption:{ | ||
limit:8192 | ||
} | ||
}, | ||
rn: { | ||
appName: 'taroDemo', | ||
postcss: { | ||
cssModules: { | ||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true | ||
} | ||
} | ||
} | ||
} | ||
|
||
module.exports = function (merge) { | ||
if (process.env.NODE_ENV === 'development') { | ||
return merge({}, config, require('./dev')) | ||
} | ||
return merge({}, config, require('./prod')) | ||
} |
Oops, something went wrong.