mirror of https://github.com/layui/layui
Browse Source
* ci: 使用 pkg-pr-new 预发布 PR 并生成预览模板 * update * update * update * ci: 更换文件名 --------- Co-authored-by: 贤心 <3277200+sentsim@users.noreply.github.com>pull/2181/head
morning-star
3 months ago
committed by
GitHub
5 changed files with 65 additions and 0 deletions
@ -0,0 +1,23 @@
|
||||
name: Publish Pull Request Preview |
||||
on: [pull_request] |
||||
|
||||
jobs: |
||||
build: |
||||
runs-on: ubuntu-latest |
||||
|
||||
steps: |
||||
- name: Checkout code |
||||
uses: actions/checkout@v4 |
||||
|
||||
- name: Setup node |
||||
uses: actions/setup-node@v4 |
||||
with: |
||||
node-version: 20 |
||||
|
||||
- name: Install dependencies |
||||
run: npm install |
||||
|
||||
- name: Build |
||||
run: npm run build |
||||
|
||||
- run: npx pkg-pr-new publish --template './examples/pr-preview' |
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<title>layui-example</title> |
||||
<link href="node_modules/layui/dist/css/layui.css" rel="stylesheet"> |
||||
</head> |
||||
<body class="layui-padding-3"> |
||||
<button type="button" class="layui-btn">默认按钮</button> |
||||
|
||||
<script src="node_modules/layui/dist/layui.js"></script> |
||||
<script src="./index.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,6 @@
|
||||
layui.use(function(){ |
||||
var $ = layui.$; |
||||
var layer = layui.layer; |
||||
|
||||
layer.msg(layui.v); |
||||
}) |
@ -0,0 +1,17 @@
|
||||
{ |
||||
"name": "layui-example", |
||||
"private": true, |
||||
"version": "0.0.0", |
||||
"description": "generated by pkg.pr.new", |
||||
"main": "index.js", |
||||
"type": "module", |
||||
"scripts": { |
||||
"dev": "servor --reload" |
||||
}, |
||||
"dependencies": { |
||||
"servor": "^4.0.2", |
||||
"layui": "latest" |
||||
}, |
||||
"author": "pkg.pr.new", |
||||
"license": "ISC" |
||||
} |
Loading…
Reference in new issue