o2team / athena2 Goto Github PK
View Code? Open in Web Editor NEWBuild tool based on Webpack
License: MIT License
Build tool based on Webpack
License: MIT License
问题描述:
触发onClick时,IE8会在return; t(e,l,r,o,u) 这里报 Function Expect错误。
分析:
代码压缩会把Nerv中的dispatchEvent名变为t,可能会与eventsToTrigger变量重名导致
调用失败。0.0.7版本可修复
操作系统:window xp
浏览器:IE8
Nerv版本:1.2.12
athena2版本:0.0.15
命令行操作如下:
$ ath2 a --h5
Allo fred! Prepare to create a new app!
Need help? Go and open issue: https://github.com/o2team/athena2/issues/new
? Please give me an app name! nerv-h5
? Please give me an app name! nerv-h5
? Please tell me your app's description! nerv-h5
? Please tell me your app's description! nerv-h5
? Please choose your app platform (Use arrow keys)
? Please choose your app platform Mobile
? Please tell me which h5 template you prepare to use, default to base! default
? Please tell me which h5 template you prepare to use, default to base! default
Failed to download repo [email protected]:o2h5/h5-templates.git: 'git clone' failed with status 128
目录环境如下:
src
|- index.html
|- index.js
|- common/page/hello.js
|- common/page/hello.html
|- userCenter/page/index.js
|- userCenter/page/index.html
ath2 build后提示:
Current building modules common userCenter!
× No file to build, please check if the page directories are empty!
GoodBye!
--framework 指定项目使用的框架,输入框架名称,支持Nerv、React、Vue三大框架。
我不想使用框架,仅仅是使用原生JS的多页应用,在框架选择这一步如何操作,谢谢!
下载一个基于athena2构建的项目,怎么安装,npm install无效
After init a project by command that 'ath2 a --name merc-protal-project --sass --template complete --framework nerv', 'prod.js' miss a comma be found in 'config'.
因为之前用react的时候用了css-modules,现在迁移过来之后,发现默认配置不支持这个,于是在config里面加了rules单独处理,在看了源码之后发现您的配置里面有一个
{
loader: require.resolve('postcss-loader'),
options: {
ident: 'postcss',
plugins: () => getPostcssPlugins(buildConfig, platform, template)
}
}
这个配置,里面其实没法调用getPostcssPlugins这个方法,请指教一下,如果要加入css-modules的话,我该怎么处理这个配置,附上项目的config/index.js的这个配置.
const config = {
// source files root directory
sourceRoot: 'src',
// output files root directory
outputRoot: 'dist',
// The publicPath specifies the public URL address of the output files when referenced in a browser
// see https://webpack.js.org/guides/public-path/
publicPath: '/',
// the directory contains css/js/images/fonts/media etc. files
staticDirectory: 'static',
// define global constants for application see https://webpack.js.org/plugins/define-plugin/
defineConstants: {},
htmlSnippetDirectory: [
'view'
],
library: {
name: 'base',
directory: 'lib',
libs: [
'nervjs','axios','immutable','nerv-redux','react-route-dom'
]
},
// support functions
module: {
postcss: {
// autoprefixer plugin config
autoprefixer: {
enable: true
}
},
rules: [
{
test: /\.(css|scss|sass)(\?.*)?$/,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1
}
},
{
loader: require.resolve('postcss-loader'),
options: {
ident: 'postcss',
plugins: () => getPostcssPlugins(buildConfig, platform, template)
}
},
require.resolve('sass-loader')
]
}
]
},
webpack:{
resolve: {
alias: {
baseCss:'./src/common/asset/style/base.sass'
}
}
}
}
module.exports = function (merge) {
if (process.env.NODE_ENV === 'development') {
return merge({}, config, require('./dev'))
}
return merge({}, config, require('./prod'))
}
Current building modules common hhh!
⠋ Starting development server, please wait🤡~(node:68459) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks
instead
ℹ 「wds」: Project is running
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/Downloads/test9/testvue/dist
ℹ 「wds」: 404s will fallback to /index.html
✖ Compile failed!
./src/hhh/page/hello/hello.js
Module build failed (from nvm/versions/node/v8.11.3/lib/node_modules/athena2/node_modules/_hot-module-accept@1.1.2@hot-module-accept/index.js):
TypeError: Cannot read property 'entry' of undefined
Failed to download repo [email protected]:o2h5/h5-templates.git: 'git clone' failed with status 128
git.jd.com访问不了了
When i change files, the development environment can rebuild but the brower can't reload!
what should i do to make it work?
在使用过程中发现,app.config.js 文件下的 「muduleList」项仍然采用 athena1 的方式,把所有的模块放在一行,这不利于团队Git管理。希望一个模块占一行,如下:
moduleList: ['common','m1'],
改成:
moduleList: [
'common',
'm1',
],
如题 0.0.7版本可以正常生成
0.0.9-alpha.5版本中执行ath2 build后,library目录生成后又被清除了
Failed to download repo [email protected]:o2h5/h5-templates.git: 'git clone' failed with status 128
请问这个配置文件应该怎么写?
Error: Cannot find module '/Users/liuyiman/learnspace/athena2/h5/config'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at exports.getAppBuildConfig (/Users/liuyiman/privatespace/athena2/src/build/index.js:57:23)
at serveCore (/Users/liuyiman/privatespace/athena2/src/build/serve.js:48:23)
at serveApp (/Users/liuyiman/privatespace/athena2/src/build/serve.js:184:5)
at serve (/Users/liuyiman/privatespace/athena2/src/build/serve.js:32:7)
at Object. (/Users/liuyiman/privatespace/athena2/bin/tfe-serve:26:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
什么时候升级到webpack4+?
10 silly lifecycle [email protected]~start: Args: [ '-c', 'ath2 s' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `ath2 s`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:920:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
I just set const HtmlWebpackPlugin = require('html-webpack-plugin');
in dev.js
, there is a error when i exec ath2 s
!!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.