Skip to content

Commit

Permalink
chore: rename dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed May 6, 2022
1 parent 0da7c55 commit 017198a
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 13 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: CI

on:
- push
- pull_request
push:
branches:
- 'master'
paths:
- 'devtools/**/*'
- 'patches/**/*'
- 'server/**/*'
- 'target/**/*'

jobs:
ci:
Expand All @@ -11,14 +17,21 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [10.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install depot_tools
run: |
sudo apt-get install git curl xz-utils python3-pkg-resources python3-virtualenv python3-oauth2client
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "PATH=$(pwd)/depot_tools:$PATH" >> $GITHUB_ENV
- run: |
npm i -g @liriliri/lsla
npm i
npm run lint
npm run init:front_end
npm run build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Remote debugging tool like [weinre](https://people.apache.org/~pmuellr/weinre/do

![Demo](https://res.liriliri.io/chii/qrcode.png)

Browse it on your phone: [https://chii.liriliri.io/tests/demo.html](https://chii.liriliri.io/tests/demo.html)
Browse it on your phone: [https://chii.liriliri.io/test/demo.html](https://chii.liriliri.io/test/demo.html)

Open [https://chii.liriliri.io/](https://chii.liriliri.io/) and click inspect to start debugging the demo page.

Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

![Demo](https://res.liriliri.io/chii/qrcode.png)

请扫描二维码或在手机上直接访问:[https://chii.liriliri.io/tests/demo.html](https://chii.liriliri.io/tests/demo.html)
请扫描二维码或在手机上直接访问:[https://chii.liriliri.io/test/demo.html](https://chii.liriliri.io/test/demo.html)

打开 [https://chii.liriliri.io/](https://chii.liriliri.io/) 并点击 inspect 按钮开始调试示例页面。

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"ci": "npm run lint && npm run build",
"format": "npm run format:front_end && npm run format:target && npm run format:server && prettier *.{js,json} scripts/*.js bin/*.js tests/*.{html,json,js,css} --write",
"format": "npm run format:front_end && npm run format:target && npm run format:server && prettier '*.{js,json}' 'bin/*.js' 'test/*.{html,json,js,css}' --write",
"format:front_end": "lsla prettier 'front_end/**/*.{html,js,json}' --write",
"format:target": "lsla prettier 'target/**/*.ts' --write",
"format:server": "lsla prettier 'server/**/*.js' --write",
Expand All @@ -20,7 +20,7 @@
"lint": "npm run lint:server && npm run lint:target",
"lint:server": "eslint server/**/*.js",
"lint:target": "tslint target/**/*.ts",
"init:front_end": "cd devtools && rm -rf devtools-frontend && gclient sync --with_branch_heads --verbose && cd ../ && python3 scripts/apply_all_patches.py patches/config.json"
"init:front_end": "cd devtools && rm -rf devtools-frontend && gclient sync --with_branch_heads --verbose && cd ../ && python3 script/apply_all_patches.py patches/config.json"
},
"repository": {
"type": "git",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion server/middle/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = function (channelManager, domain) {
}

createStatic('/front_end', '/public/front_end');
createStatic('/tests', '/tests');
createStatic('/test', '/test');

router.get('/target.js', async ctx => {
await send(ctx, 'target.js', {
Expand Down
2 changes: 1 addition & 1 deletion server/tpl/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<div class="description">
You can use this script to inject the chii target code into your web page.<br/>
<a target="_blank" href="//{{domain}}/target.js">{{domain}}/target.js</a> <br/>
Or just open the demo page <a target="_blank" href="//{{domain}}/tests/demo.html">{{domain}}/tests/demo.html</a> to play around with.<br/>
Or just open the demo page <a target="_blank" href="//{{domain}}/test/demo.html">{{domain}}/test/demo.html</a> to play around with.<br/>
<a target="_blank" href="https://github.com/liriliri/chii">Chii v{{version}}</a>
</div>
{{/each}}
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/demo.js → test/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ function intervalStuff() {
// do an XHR
var xhr = new XMLHttpRequest();
// xhr.addEventListener("readystatechange", function() {logXhr(this)})
xhr.open('GET', '../tests/demo.json', true);
xhr.open('GET', '../test/demo.json', true);
xhr.send();

// do an FETCH
fetch('../tests/demo.json');
fetch('../test/demo.json');
}

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -160,7 +160,7 @@ function logXhr(xhr) {

function injectTarget() {
const href = location.href;
const host = href.replace('/tests/demo.html', '').replace(location.protocol + '//', '');
const host = href.replace('/test/demo.html', '').replace(location.protocol + '//', '');
const src = '//' + host + '/target.js';
const script = document.createElement('script');
script.src = src;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 017198a

Please sign in to comment.