Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { //string TODO:是否要考虑多包项目呢 Context string //map[string]string Entry EntryPointsResults //string {} Mode ModeResults Output OutputPointsResults //TODO:确定配置方案 Plugin PluginPointsResults }
Configuration ConfigurationPoints 转换为 Configuration 固定类型声明
func NewConfig ¶
func NewConfig(c ConfigurationPoints) *Configuration
type ConfigurationPoints ¶
type ConfigurationPoints struct { //入口和上下文=============================================================== //string https://webpack.docschina.org/configuration/entry-context/#context Context string // string | string[] | map[string]string Entry EntryPoints `json:"entry"` //模式===================================================================== //string = 'production': 'none' | 'development' | 'production' Mode string `json:"mode"` //string []string Output OutputPoints `json:"output"` Plugin PluginPoints `json:"plugin"` }
ConfigurationPoints JSON 类型声明
func NewConfigPoints ¶
func NewConfigPoints(arg ...interface{}) *ConfigurationPoints
func (*ConfigurationPoints) ReadConfig ¶
func (c *ConfigurationPoints) ReadConfig() *Configuration
ReadConfig 在此处进行配置的读取和转换 注意!!! 必须在执行完成 ReadFile后调用
func (*ConfigurationPoints) ReadFile ¶
func (c *ConfigurationPoints) ReadFile(arg ...interface{}) *ConfigurationPoints
ReadFile TODO 读取配置文件
func (*ConfigurationPoints) WatchFileChange ¶
func (c *ConfigurationPoints) WatchFileChange()
WatchFileChange TODO
type EntryPoints ¶
type EntryPoints interface{}
EntryPoints https://webpack.docschina.org/concepts/entry-points/
type EntryPointsResults ¶
EntryPointsResults 统一将类型转换为Map类型 TODO:支持复杂结构
type ModeResults ¶
type ModeResults uint8
ModeResults https://webpack.docschina.org/configuration/mode/
const ( Production ModeResults = iota Development None )
type OutputPoints ¶
type OutputPoints interface{}
OutputPoints https://webpack.docschina.org/configuration/output/
type OutputPointsResults ¶
OutputPointsResults 统一将类型转换为结构体 TODO:支持复杂结构
type PluginPoints ¶
type PluginPoints interface{}
PluginPoints https://webpack.docschina.org/concepts/plugins/#anatomy
Click to show internal directories.
Click to hide internal directories.