ant-tool / atool-build

:hammer: Build tool based on webpack.
391 stars 75 forks source link

feat: package.json theme 支持字符串类型 #176

Closed yiminghe closed 8 years ago

yiminghe commented 8 years ago

如果是字符串类型,查找对应的文件(以 . 或 / 开头),或对应的模块名

theme:'./node_modules/antui-config/index.js', // 'antui-config'

antui-config/index.js

module.exports = function() {
  return {
    "brand-6":"red"
  };
};
sorrycc commented 8 years ago

@pigcan 看下。

mrbenlearnjs commented 8 years ago

请问下“theme:'./node_modules/antui-config/index.js', // 'antui-config'”配置在哪里?

pingan1927 commented 8 years ago

package.json @mrbenlearnjs

jaredleechn commented 8 years ago

module.exports = function() { return { "brand-6":"red" }; };

这里配置文件里支持自定义的 keys 都包含哪些?是 theme/default.less 里面这些么?

How to write a customize-antd-ui.config.js

@yiminghe @pingan1927 @pigcan

pingan1927 commented 8 years ago

@jaredleechn 是的,都在这里了。

@mrbenlearnjs "theme": "./node_modules/kb-merchant-theme/index.js"

这里的kb-merchant-theme是我自己发布的一个npm模块。通过install来进行引用。

goldingking commented 8 years ago

要使用"theme": "./node_modules/kb-merchant-theme/index.js"这种方式,必须使用atool-build编译才行吧?还需要哪些其他的配置?