-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
105 changed files
with
17,440 additions
and
3,093 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +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,11 @@ | ||
{ | ||
"path-intellisense.mappings": { | ||
"/": "${workspaceRoot}/src/" | ||
}, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit", | ||
"source.fixAll.tslint": "explicit", | ||
"source.fixAll.stylelint": "explicit" | ||
} | ||
} |
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,22 @@ | ||
// babel-preset-taro 更多选项和默认值: | ||
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md | ||
module.exports = { | ||
presets: [ | ||
['taro', { | ||
framework: 'react', | ||
ts: true | ||
}] | ||
], | ||
plugins: [ | ||
[ | ||
"import", | ||
{ | ||
"libraryName": "@nutui/nutui-react-taro", | ||
"libraryDirectory": "dist/esm", | ||
"style": 'css', | ||
"camel2DashComponentName": false | ||
}, | ||
'nutui-react-taro' | ||
] | ||
] | ||
} |
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 |
---|---|---|
|
@@ -4,6 +4,6 @@ module.exports = { | |
}, | ||
defineConstants: { | ||
}, | ||
weapp: {}, | ||
mini: {}, | ||
h5: {} | ||
} |
This file was deleted.
Oops, something went wrong.
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,105 @@ | ||
const config = { | ||
projectName: 'trao-cnode3', | ||
date: '2024-4-6', | ||
designWidth: 750, | ||
deviceRatio: { | ||
640: 2.34 / 2, | ||
750: 1, | ||
828: 1.81 / 2, | ||
375: 2 / 1 | ||
}, | ||
sourceRoot: 'src', | ||
outputRoot: 'dist', | ||
plugins: ['@tarojs/plugin-html'], | ||
defineConstants: { | ||
}, | ||
copy: { | ||
patterns: [ | ||
], | ||
options: { | ||
} | ||
}, | ||
framework: 'react', | ||
compiler: { | ||
type: 'webpack5', | ||
prebundle: { enable: false } | ||
}, | ||
alias: { | ||
'@': require('path').resolve(__dirname, '..', 'src') | ||
}, | ||
|
||
// resolve.fallback: { "util": false }, | ||
resolve: { | ||
fallback: { | ||
"util": require.resolve("util/"), | ||
} | ||
}, | ||
sass: { | ||
resource: require('path').resolve(__dirname, '..', 'src/assets/scss/_variable.scss'), | ||
}, | ||
mini: { | ||
miniCssExtractPluginOption: { | ||
ignoreOrder: true, | ||
}, | ||
postcss: { | ||
pxtransform: { | ||
enable: true, | ||
config: { | ||
selectorBlackList: ['nut-'] | ||
} | ||
}, | ||
url: { | ||
enable: true, | ||
config: { | ||
limit: 1024 // 设定转换尺寸上限 | ||
} | ||
}, | ||
cssModules: { | ||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true | ||
config: { | ||
namingPattern: 'module', // 转换模式,取值为 global/module | ||
generateScopedName: '[name]__[local]___[hash:base64:5]' | ||
} | ||
} | ||
} | ||
}, | ||
h5: { | ||
publicPath: '/', | ||
staticDirectory: 'static', | ||
esnextModules: ['nutui-react'], | ||
// module: { | ||
// postcss: { | ||
// autoprefixer: { | ||
// enable: true | ||
// } | ||
// } | ||
// }, | ||
postcss: { | ||
pxtransform: { | ||
enable: true, | ||
config: { | ||
selectorBlackList: ['nut-'] | ||
} | ||
}, | ||
autoprefixer: { | ||
enable: true, | ||
config: { | ||
} | ||
}, | ||
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 was deleted.
Oops, something went wrong.
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,37 @@ | ||
module.exports = { | ||
env: { | ||
NODE_ENV: '"production"' | ||
}, | ||
defineConstants: { | ||
}, | ||
mini: {}, | ||
h5: { | ||
/** | ||
* WebpackChain 插件配置 | ||
* @docs https://github.com/neutrinojs/webpack-chain | ||
*/ | ||
// webpackChain (chain) { | ||
// /** | ||
// * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。 | ||
// * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer | ||
// */ | ||
// chain.plugin('analyzer') | ||
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, []) | ||
|
||
// /** | ||
// * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。 | ||
// * @docs https://github.com/chrisvfritz/prerender-spa-plugin | ||
// */ | ||
// const path = require('path') | ||
// const Prerender = require('prerender-spa-plugin') | ||
// const staticDir = path.join(__dirname, '..', 'dist') | ||
// chain | ||
// .plugin('prerender') | ||
// .use(new Prerender({ | ||
// staticDir, | ||
// routes: [ '/pages/index/index' ], | ||
// postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') }) | ||
// })) | ||
// } | ||
} | ||
} |
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,11 @@ | ||
{ | ||
"format": 2, | ||
"compileOptions": { | ||
"transpile": { | ||
"script": { | ||
"ignore": ["node_modules/**"] | ||
} | ||
}, | ||
"component2": true | ||
} | ||
} |
Oops, something went wrong.