IE8 CLI is a Tooling for project Development With IE8 Compability.
It is 2019. The users using IE8 is not that much now. Developling this tool seems not a smart move. But, I need to support ie8 (at work). I need a tool to maintain what I have figured out during development. So, this is the reason why it comes out.
IE8 will be completely abandoned someday. And this tool will be totally useless at that time. But, since it uses latest tools such as
webpack4 (which means the projects generated by the tool doesn't need to change much when you decide not to support ie8), it will helps before that time.
This tool is for creating projects with ie8 compability by using preset boilerplates. It integrates several tools:
- sanjs (a framework kindof like vue)
- anujs (A mini React-like framework that is extremely compatible with React16)
I spent a lot of time figuring out how to use latest webpack tools in ie8 development. With this tool, you can develop with webpack 4.x, which means that all proposals is usable only if you set up corresponding babel plugins.
note: there still are some several unsupport features:
definePropertyis wierd in ie8. Please keep in mind that in ie8
definePropertycan only be used with dom instances during development.
npm install -g ie8-cli# ORyarn global add ie8-cli
Create a project:
ie8 create my-project
all options of command
create (which can be accessed by
ie8 create -h):
Usage: create [options] <app-name> create a new project powered by ie8-cli Options: --type <value> Boilerplate type, default to `es` -d, --default Skip prompts and use default preset -f, --force Overwrite target directory if it exists -i, --install Install dependencies after creating project --exclude <items> Exclude files in target directory that you do not wanna cover while merging -h, --help output usage information
The alternatives of option
type are as below:
|es||using es6 (default setting)|
|san||using san (https://github.com/baidu/san)|
|anujs||using anujs (https://github.com/RubyLouvre/anu)|
use it if you want to excludes some files when merging
- seperate the filepaths with comma
- filepaths can be file names or directory path
- it only works under
mergemode (when you create a project in an existed directory)
ie8 create my-project --exclude=package.json,config# exludes files: my-project/package.json my-project/config/*
You can choose needed extesions when you create a project. Preset
default contains all of them as below:
- san-store (only show when you choose
- polyfills（ie8, fetch-ie8, fetch-jsonp-polyfill, dom4, console-polyfill）
You can choose
Munually select features if you want to customize by your own.
- node >= 8.9