mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-01 19:54:27 +00:00
build: update CI
This commit is contained in:
parent
cccab0f5fb
commit
48037cb290
3
.github/workflows/nodejs.yml
vendored
3
.github/workflows/nodejs.yml
vendored
@ -47,9 +47,10 @@ jobs:
|
|||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- name: npm install, build, and test
|
- name: npm install, lint, build, and test
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
|
npm run lint
|
||||||
npm run build --if-present
|
npm run build --if-present
|
||||||
npm run test:unit
|
npm run test:unit
|
||||||
env:
|
env:
|
||||||
|
@ -14,14 +14,17 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
const requireComponent = require.context('../../assets', false, /\.png$/);
|
const requireComponent = require.context("../../assets", false, /\.png$/);
|
||||||
|
|
||||||
const result = {};
|
const result = {};
|
||||||
function capitalizeFirstLetter(str) {
|
function capitalizeFirstLetter(str) {
|
||||||
return str.toUpperCase();
|
return str.toUpperCase();
|
||||||
}
|
}
|
||||||
function validateFileName(str) {
|
function validateFileName(str) {
|
||||||
return /^\S+\.png$/.test(str) && str.replace(/^\S+\/(\w+)\.png$/, (rs, $1) => capitalizeFirstLetter($1));
|
return (
|
||||||
|
/^\S+\.png$/.test(str) &&
|
||||||
|
str.replace(/^\S+\/(\w+)\.png$/, (rs, $1) => capitalizeFirstLetter($1))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
requireComponent.keys().forEach((filePath) => {
|
requireComponent.keys().forEach((filePath) => {
|
||||||
const componentConfig = requireComponent(filePath);
|
const componentConfig = requireComponent(filePath);
|
||||||
|
Loading…
Reference in New Issue
Block a user