Giter Club home page Giter Club logo

athena2's People

Contributors

luckyadam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

athena2's Issues

新版本的UglifyJS配置可能会导致代码在IE8下出错

问题描述:
触发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

无法正常安装h5模板

命令行操作如下:

$ 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

总提是page目录下无文件,build不了

目录环境如下:
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的多页应用,在框架选择这一步如何操作,谢谢!

There is a error that miss a comma

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'.

想问一下,使用css-modules该怎么配置

因为之前用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'))
}

多页面 vue的时候启动报错

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

About the brower can't reload!

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 的 moduleList 修改建议

在使用过程中发现,app.config.js 文件下的 「muduleList」项仍然采用 athena1 的方式,把所有的模块放在一行,这不利于团队Git管理。希望一个模块占一行,如下:

moduleList: ['common','m1'],

改成:

moduleList: [
    'common',
    'm1', 
],

h5 版本缺少配置文件

请问这个配置文件应该怎么写?
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)

add html-webpack-plugin but can't start

development environment

[email protected]
[email protected]
[email protected]

error

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!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.