Skip to content

Commit e0e9e28

Browse files
committed
feat: enhance project configuration with Vite setup
1 parent 312d59c commit e0e9e28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3483
-3250
lines changed

.babelrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [20.x]
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- run: yarn
26+
- run: |
27+
yarn run lint
28+
yarn run build

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
node_modules
2-
npm-debug.log
3-
package-lock.json
4-
/.nyc_output
51
/coverage
62
/dist
7-
/output
8-
/releases
9-
/lib
3+
node_modules

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package-lock.json
2+
yarn.lock

.stylintrc

Lines changed: 0 additions & 38 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 https://github.com/cncjs
3+
Copyright (c) 2017-present https://github.com/cncjs
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# cncjs-widget-boilerplate [![build status](https://travis-ci.org/cncjs/cncjs-widget-boilerplate.svg?branch=master)](https://travis-ci.org/cncjs/cncjs-widget-boilerplate) [![Coverage Status](https://coveralls.io/repos/github/cncjs/cncjs-widget-boilerplate/badge.svg?branch=master)](https://coveralls.io/github/cncjs/cncjs-widget-boilerplate?branch=master)
1+
# cncjs-widget-boilerplate
22

33
**Custom Widget for CNCjs**
44

@@ -13,8 +13,7 @@ Custom Widget Version | CNCjs Version
1313
## Installation
1414

1515
```bash
16-
npm i -g npm # Upgrade NPM to the latest version
17-
npm install
16+
yarn install
1817
```
1918

2019
## Development Guide
@@ -24,25 +23,20 @@ Create a directory under <b>src/widgets</b> and put your code in there.
2423
```
2524
src/
2625
widgets/
27-
MyApp/index.js
26+
custom/index.jsx
2827
```
2928

30-
When connecting to a local development server, you can specify the "widget" query parameter within your browser to switch between widgets (e.g. `http://localhost:5000/?widget=MyApp`).
29+
Run `yarn dev` to start a development server.
3130

3231
### Query Parameters
3332

3433
Name | Description
3534
:--- | :----------
3635
token | (Required) An authentication token to enable secure communication. The token will be automatically set by CNCjs.
3736
host | (Optional) Specifies the host to connect to. Defaults to an empty string.
38-
widget | (Optional) Specifies a folder name under 'src/widgets'. Defaults to 'ReactApp'.
3937

4038
### Examples
4139

42-
#### React App
43-
44-
There is a widget written with React, you can download it from the releases page: https://github.com/cncjs/cncjs-widget-boilerplate/releases
45-
4640
![image](https://user-images.githubusercontent.com/447801/30728983-b866f4b6-9f8e-11e7-9a90-6b712344d270.png)
4741

4842
## Development

assets/index.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)