Skip to content

Commit

Permalink
release(shader-toy-player): v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Sep 18, 2024
1 parent 3e8a5c7 commit 8556637
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
"icon": true,
"vue": true,
"test": false,
"version": "0.2.0",
"version": "0.3.0",
"style": true,
"install": false,
"react": false,
Expand Down
4 changes: 3 additions & 1 deletion lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = wrap(async function (component) {
const pkg = cloneDeep(require('../package.json'))
delete pkg.scripts
delete pkg.bin
pkg.type = 'module'
pkg.main = `cjs/${component}/index.js`
pkg.module = `esm/${component}/index.js`
const componentPkg = require(`../src/${component}/package.json`)
Expand All @@ -57,7 +58,8 @@ module.exports = wrap(async function (component) {
pkg.peerDependencies = peerDependencies
}
pkg.exports = {
'.': `./esm/${component}/index.js`,
require: `./cjs/${component}/index.js`,
import: `./esm/${component}/index.js`,
'./css': `./luna-${component}.css`,
[`./luna-${component}.css`]: `./luna-${component}.css`,
[`./luna-${component}.js`]: `./luna-${component}.js`,
Expand Down
6 changes: 2 additions & 4 deletions src/shader-toy-player/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import fullscreen from 'licia/fullscreen'
import raf from 'licia/raf'
import { drag, eventPage, exportCjs } from '../share/util'
import { piCreateAudioContext, piCreateFPSCounter } from './piLibs'

// eslint-disable-next-line @typescript-eslint/no-var-requires
const Effect = require('./Effect').default
import Effect from './Effect'

const $document = $(document as any)

Expand Down Expand Up @@ -86,7 +84,7 @@ export default class ShaderToyPlayer extends Component<IOptions> {
this.$time = this.find('.time')
this.$fps = this.find('.fps')

this.effect = new Effect(
this.effect = new (Effect as any)(
null,
piCreateAudioContext(),
this.canvas,
Expand Down
2 changes: 1 addition & 1 deletion src/shader-toy-player/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shader-toy-player",
"version": "0.2.0",
"version": "0.3.0",
"description": "Shader toy player",
"luna": {
"icon": true,
Expand Down

0 comments on commit 8556637

Please sign in to comment.