Skip to content

Commit

Permalink
feat: enhance project configuration with Vite setup
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Nov 22, 2024
1 parent 312d59c commit 552f96d
Show file tree
Hide file tree
Showing 42 changed files with 3,483 additions and 3,249 deletions.
6 changes: 0 additions & 6 deletions .babelrc

This file was deleted.

8 changes: 0 additions & 8 deletions .eslintrc

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: |
yarn run lint
yarn run build
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
node_modules
npm-debug.log
package-lock.json
/.nyc_output
/coverage
/dist
/output
/releases
/lib
node_modules
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package-lock.json
yarn.lock
38 changes: 0 additions & 38 deletions .stylintrc

This file was deleted.

43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

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

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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)
# cncjs-widget-boilerplate

**Custom Widget for CNCjs**

Expand All @@ -13,8 +13,7 @@ Custom Widget Version | CNCjs Version
## Installation

```bash
npm i -g npm # Upgrade NPM to the latest version
npm install
yarn install
```

## Development Guide
Expand All @@ -24,25 +23,20 @@ Create a directory under <b>src/widgets</b> and put your code in there.
```
src/
widgets/
MyApp/index.js
custom/index.jsx
```

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`).
Run `yarn dev` to start a development server.

### Query Parameters

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

### Examples

#### React App

There is a widget written with React, you can download it from the releases page: https://github.com/cncjs/cncjs-widget-boilerplate/releases

![image](https://user-images.githubusercontent.com/447801/30728983-b866f4b6-9f8e-11e7-9a90-6b712344d270.png)

## Development
Expand Down
13 changes: 0 additions & 13 deletions assets/index.html

This file was deleted.

15 changes: 0 additions & 15 deletions docs/index.html

This file was deleted.

2 changes: 0 additions & 2 deletions docs/v1/0.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/v1/0.bundle.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions docs/v1/1.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/v1/1.bundle.js.map

This file was deleted.

Binary file removed docs/v1/674f50d287a8c48dc19ba404d20fe713.eot
Binary file not shown.
Loading

0 comments on commit 552f96d

Please sign in to comment.