seg 物料开发者工具

Usage no npm install needed!

<script type="module">
  import 100talSegSegMaterials from 'https://cdn.skypack.dev/@100tal-seg/seg-materials';



Creates a materials application using the command line, is the Standard Tooling for ICE material Development.


Prerequisites: Node.js (>=10.x), npm version 6+.

$ npm i seg-materials -g

Quick Start

$ mkdir my-materials && cd my-materials
$ sm init

It will create a directory called my-materials inside the current folder.

Inside that directory, it will generate the initial project structure:

    ├── blocks
    │      └── Greeting
    ├── scaffolds
    │      └── lite
    ├── .editorconfig
    ├── .eslintignore
    ├── .eslintrc
    ├── .gitignore
    ├── .prettierignore
    ├── .prettierrc
    ├── LICENSE
    ├── README.md
    └── package.json

No configuration or complicated folder structures, just the files you need to build your materials app.

Inside the newly created project, you can run some built-in commands:

$ npm run deploy //  equal to: ice-devtools generate && ice-devtools sync

It will be automatically generate materials JSON data in build folder,The build folder is ready to be deployed,return a material source interface.

Add Materilas

You can add materials, including blocks and templates:

$ sm add


Docs are available at intro-materials - we are still working on refining it and contributions are welcome!


Install puppeteer: cnpm i puppeteer