Skip to content

Commit

Permalink
feat: upload deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ximing committed Jul 15, 2023
1 parent b931b45 commit 2698ee6
Show file tree
Hide file tree
Showing 17 changed files with 5,031 additions and 18,796 deletions.
151 changes: 83 additions & 68 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,72 +1,87 @@
{
"presets": [
"@babel/react",
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"safari >= 9",
"android >= 4.1",
"chrome >= 50",
"ie >= 11"
]
},
"modules": "commonjs",
"debug": false,
"spec": false,
"loose": false,
"useBuiltIns": false,
"include": [],
"exclude": [],
"forceAllTransforms": false
}
]
],
"comments": false,
"env": {
"test":{
"presets": [
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
},
"modules": "commonjs",
"debug": false,
"spec": false,
"loose": false,
"useBuiltIns": false,
"include": [],
"exclude": [],
"forceAllTransforms": false
}
"@babel/preset-env",
{
"targets": {
"browsers": ["safari >= 10", "android >= 5", "chrome >= 50"]
},
"modules": "commonjs",
"debug": false,
"spec": false,
"loose": false,
"useBuiltIns": false,
"include": [],
"exclude": [],
"forceAllTransforms": false
}
]
],
}
},
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
}
"comments": false,
"env": {
"test": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "8"
},
"modules": "commonjs",
"debug": false,
"spec": false,
"loose": false,
"useBuiltIns": false,
"include": [],
"exclude": [],
"forceAllTransforms": false
}
]
],
"plugins": [
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
}
},
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
}
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build
on:
push:
branches:
- master
- deploy
tags:
- v1
paths:
- 'src/**'
- '__tests__/**'
- '.github/**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: use Node.js 10
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: npm install
run: |
npm install --registry=https://registry.npmjs.org
npm run build
env:
CI: true
23 changes: 23 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: ["push", "pull_request"]
name: Test Coveralls
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x

- name: npm install
run: npm install --registry=https://registry.npmjs.org

- name: Run tests
run: npm run test:coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions ava.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
files: ["test/**/*.js", "!test/lib/*.js", "!test/change/op/error/*.js"],
cache: false,
concurrency: 4,
failFast: true,
failWithoutAssertions: false,
tap: true,
verbose: true,
require: ["@babel/register", "./test/_register.js"],
};
13 changes: 0 additions & 13 deletions example/DemoContainer.js

This file was deleted.

37 changes: 0 additions & 37 deletions example/ViewContainer.js

This file was deleted.

33 changes: 0 additions & 33 deletions example/index.js

This file was deleted.

22 changes: 0 additions & 22 deletions example/index.scss

This file was deleted.

20 changes: 0 additions & 20 deletions example/tpl.ejs

This file was deleted.

Loading

0 comments on commit 2698ee6

Please sign in to comment.