Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Aug 22, 2024
0 parents commit c697585
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: build

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up npm
run: npm install
- name: Build
run: npm run build
- name: push
uses: actions-go/push@master
with:
author-email: [email protected]
author-name: Taromati2
commit-message: 'file update~'
remote: origin
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

/node_modules
package-lock.json
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "bundle-cdn",
"version": "0.0.0",
"description": "my bundle cdn",
"scripts": {
"build": "rollup -c ./src/rollup.config.mjs"
},
"repository": {
"type": "git",
"url": "git+https://github.com/steve02081504/bundle-cdn.git"
},
"author": "steve02081504",
"bugs": {
"url": "https://github.com/steve02081504/bundle-cdn/issues"
},
"homepage": "https://github.com/steve02081504/bundle-cdn#readme",
"dependencies": {
"buffer": "latest",
"node-unrar-js": "latest"
},
"devDependencies": {
"@rollup/plugin-json": "latest",
"@rollup/plugin-commonjs": "latest",
"@rollup/plugin-node-resolve": "latest",
"@rollup/plugin-terser": "latest",
"rollup": "latest",
"rollup-plugin-polyfill-node": "latest"
}
}
2 changes: 2 additions & 0 deletions packages/buffer.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { Buffer } from 'buffer'
export default Buffer
2 changes: 2 additions & 0 deletions packages/node-unrar-js.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import * as exports from 'node-unrar-js'
export default exports
32 changes: 32 additions & 0 deletions src/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { nodeResolve } from '@rollup/plugin-node-resolve'
import terser from '@rollup/plugin-terser'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import nodePolyfills from 'rollup-plugin-polyfill-node'

let plugins = [nodeResolve(), commonjs(), nodePolyfills(), json(), terser()]

export default [
{
input: 'packages/buffer.mjs',
output: {
name: 'buffer',
strict: false,
file: 'dist/buffer.js',
format: 'iife',
sourcemap: true
},
plugins,
},
{
input: 'packages/node-unrar-js.mjs',
output: {
name: 'node_unrar_js',
strict: false,
file: 'dist/node-unrar-js.js',
format: 'iife',
sourcemap: true
},
plugins,
},
]

0 comments on commit c697585

Please sign in to comment.