@abstackco/vue-cli-plugin-trinity-library 中文文档教程
Trinity - Vue CLI
Trinity 框架 Vue CLI 插件。
Install
如果您尚未安装 Vue CLI,请先按照此处 的安装说明进行操作。
如果您还没有创建项目,请使用 Vue CLI 生成一个项目:
vue create my-app
cd my-app
在安装 Trinity 之前,请确保提交或存储您的更改,以防您需要恢复。 如果您没有对项目进行任何更改,那么在安装插件之前您不需要做任何事情。
运行以下命令以在您的应用程序中初始化 Trinity。
vue add @abstackco/trinity-library
Configuration
或者,您可以使用以下安装选项配置您的 Trinity Vue CLI 插件。
由于 Trinity 使用 Sass,如果您想进一步配置 Trinity,则需要安装以下依赖项。
npm install -D node-sass sass-loader
Tree Shaking and SCSS
要在启用 tree-shaking 和/或 SCSS 的情况下安装 Trinity,只需在安装 Trinity 时添加以下任一标志:
vue add @abstackco/trinity -library --treeShaking --scss
Trinity - Vue CLI
Trinity Framework Vue CLI plugin.
Install
If you haven't yet installed Vue CLI, first follow the install instructions here.
If you haven't created a project yet, generate a project using Vue CLI:
vue create my-app
cd my-app
Before installing Trinity, make sure to commit or stash your changes in case you need to revert. If you haven't made any changes to project then you won't need to do anything prior to installing the plugin.
Run the following command to initialise Trinity in your app.
vue add @abstackco/trinity-library
Configuration
Optionally, you can configure your Trinity Vue CLI Plugin using the following installation options.
As Trinity uses Sass, you will need to install the following dependencies if you would like to configure Trinity further.
npm install -D node-sass sass-loader
Tree Shaking and SCSS
To install Trinity with tree-shaking and/or SCSS enabled, simply add either of the following flags when installing Trinity:
vue add @abstackco/trinity-library --treeShaking --scss