Psst — looking for a shareable component template? Go here --> sveltejs/component-template
此项目旨在提供开箱即用的快速搭建SDK或者web components的种子项目。
npx degit 501981732/svelte-sdk-starter demo
npm install
<!-- use rollup -->
npm run rollup:dev
npm run rollup:build
<!-- use webpack -->
npm run dev
npm run build
dist/jsdoc/svelte-sdk-starter/1.0.0/index.html
<script src="dist/build/bundle.js"></script>
let insert = null
window.customTaskSDK({
text: '',
insert: new window.customTaskSDK.PromiseToken(function executor(c) {
insert = c;
})
});
<!-- 某个moment修改文案 -->
insert({
text: '222'
})
- node-sass sass
- fix all of flexbug's issues postcss-flexbugs-fixes
- css未来语法features && autoprefixer spostcss-preset-env
- vw布局 postcss-px-to-viewport
- postcss.config.js
- .browserslistrc
- svelte-preprocess
- rollup-plugin-dev
- rollup-plugin-eslint
- .eslintrc.js
- eslint-plugin-react
- babel-eslint
- prettier
- prettier-plugin-svelte
- husky
- lint-staged
- editconfig
- babel,polyfill
- babel-eslint
- @babel/core
- @babel/plugin-transform-runtime
- @babel/preset-env @babel/runtime
- .babel.config.js
- jsdoc 由于市面上暂无svelte的解析插件(可变通改为.vue文件再使用jsdoc-vue),目前只是解析readme js