@x-edu/live-player 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-edu/live-player",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "main": "dist/cjs/XEduLivePlayer.umd.min.js",
5
5
  "scripts": {
6
6
  "start": "cross-env SDP_ENV=local gms dev",
@@ -10,13 +10,14 @@
10
10
  "start:ie11-ncet": "cross-env SDP_ENV=ncet-xedu BROWSERSLIST_ENV=production gms dev",
11
11
  "start:prod": "cross-env SDP_ENV=product gms dev",
12
12
  "build": "gms build",
13
- "build:lib": "cross-env SDP_ENV=ncet-xedu gms build --target=lib --excludeReact --formats=umd-min --name XEduLivePlayer",
13
+ "build:lib": "cross-env SDP_ENV=ncet-xedu gms build --target=lib --excludeReact --formats=commonjs --name XEduLivePlayer",
14
14
  "cache:clean": "rimraf node_modules/.cache",
15
15
  "test": "gms test:unit",
16
16
  "test:coverage": "gms test:unit --coverage --collectCoverageFrom='src/**/*.{js,jsx}'",
17
17
  "lint": "gms lint",
18
18
  "lint:fix": "gms lint --fix",
19
- "fix:lockfileVersion": "npm i --lockfile-version 1 --package-lock-only"
19
+ "fix:lockfileVersion": "npm i --lockfile-version 1 --package-lock-only",
20
+ "prepublish": "npm run build:lib"
20
21
  },
21
22
  "husky": {
22
23
  "hooks": {
package/src/App.jsx CHANGED
@@ -6,7 +6,7 @@ import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
6
6
  import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
7
7
  import { parseAdapter } from '@/util/date'
8
8
 
9
- import PublicLiveDetailWeb from './detail'
9
+ import PublicLiveDetail from './detail'
10
10
 
11
11
  Icon.url = '/fish/icon/umd-4.1.2.js'
12
12
 
@@ -15,4 +15,4 @@ dayjs.extend(isSameOrBefore)
15
15
  dayjs.extend(parseAdapter)
16
16
  dayjs.locale('zh-cn')
17
17
 
18
- export const PublicLiveDetail = PublicLiveDetailWeb
18
+ export default PublicLiveDetail
@@ -35,6 +35,7 @@ import config from '@/config/env'
35
35
  const TrackPageName = 'TCH_webPlatform_publiclive_detail_page'
36
36
 
37
37
  export default function PublicLiveDetail({
38
+ containerClassName,
38
39
  className,
39
40
  infoClassName,
40
41
  playerClassName,
@@ -316,10 +317,15 @@ export default function PublicLiveDetail({
316
317
 
317
318
  return (
318
319
  <>
319
- <div className={style['public-live-detail-wrapper']}>
320
+ <div
321
+ className={classNames(
322
+ style['public-live-detail-wrapper'],
323
+ containerClassName
324
+ )}
325
+ >
320
326
  <div
321
327
  className={classNames(
322
- style['live-panel'], className
328
+ className, style['live-panel']
323
329
  )}
324
330
  >
325
331
  <div className={infoClassName}>
package/src/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from 'react-dom'
3
3
 
4
- import {
5
- PublicLiveDetail
6
- } from './App'
4
+ import PublicLiveDetail from './App'
7
5
 
8
6
  // 测试页面内容
9
7
  render(