@articles-media/articles-dev-box 1.0.1 → 1.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/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import ReturnToLauncherButton from './src/ReturnToLauncherButton.jsx';
2
- import ArticlesAd from './src/components/ArticlesAd.jsx';
3
- import Ad from './src/components/Ad.jsx';
4
- import GameScoreboard from './src/GameScoreboard.jsx';
1
+ import ReturnToLauncherButton from '#root/src/components/Games/ReturnToLauncherButton.jsx';
2
+ import ArticlesAd from '#root/src/components/Ads/ArticlesAd.jsx';
3
+ import Ad from '#root/src/components/Ads/Ad.jsx';
4
+ import GameScoreboard from '#root/src/components/Games/GameScoreboard.jsx';
5
5
 
6
6
  function helloWorld() {
7
7
  return "Hello, world!";
package/package.json CHANGED
@@ -1,18 +1,27 @@
1
1
  {
2
2
  "name": "@articles-media/articles-dev-box",
3
3
  "description": "Shared code, functions, and components for different Articles Media projects.",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "type": "module",
6
+ "imports": {
7
+ "#root/src/*": "./src/*"
8
+ },
6
9
  "main": "index.js",
7
10
  "files": [
8
11
  "index.js",
9
- "src",
10
- "styles"
12
+ "src"
11
13
  ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/Articles-Joey/articles-dev-box"
17
+ },
12
18
  "exports": {
13
19
  ".": "./index.js"
14
20
  },
15
21
  "scripts": {
22
+ "dev": "vite",
23
+ "build": "vite build",
24
+ "preview": "vite preview",
16
25
  "test": "echo \"Error: no test specified\" && exit 1"
17
26
  },
18
27
  "keywords": [],
@@ -23,8 +32,10 @@
23
32
  "react-dom": ">=19.2.3"
24
33
  },
25
34
  "devDependencies": {
35
+ "@vitejs/plugin-react": "^5.1.2",
26
36
  "classnames": "^2.5.1",
27
- "sass": "^1.97.2"
37
+ "sass": "^1.97.2",
38
+ "vite": "^7.3.1"
28
39
  },
29
40
  "dependencies": {
30
41
  "axios": "^1.13.2",
@@ -13,8 +13,8 @@ import axios from 'axios'
13
13
  import { useInView } from 'react-intersection-observer';
14
14
 
15
15
  // import ROUTES from 'components/constants/routes';
16
- import useAd from '../hooks/Ads/useAd';
17
- import useAds from '../hooks/Ads/useAds';
16
+ import useAd from '#root/src/hooks/Ads/useAd';
17
+ import useAds from '#root/src/hooks/Ads/useAds';
18
18
 
19
19
  // import SavePromoModal from 'components/Ads/SavePromoModal';
20
20
  // const SavePromoModal = dynamic(
@@ -30,11 +30,11 @@ import useAds from '../hooks/Ads/useAds';
30
30
  // import generateRandomInteger from 'util/generateRandomInteger'
31
31
  // import { setViewedAds } from '@/redux/actions/adsActions';
32
32
  import { differenceInMinutes, parse, parseISO } from 'date-fns';
33
- import ArticlesButton from '../Button';
33
+ import ArticlesButton from '#root/src/components/UI/Button';
34
34
  // import useAds from 'hooks/Ads/useAds';
35
35
 
36
36
  // import "../../styles/components/Ads/Ad.scss";
37
- import "../../styles/components/Ad.scss";
37
+ import "#root/src/styles/components/Ad.scss";
38
38
 
39
39
  function generateRandomInteger(min, max) {
40
40
  return Math.floor(Math.random() * (max - min + 1)) + min;
@@ -1,50 +1,3 @@
1
- // import React from 'react';
2
- // import '../styles/components/GameScoreboard.scss';
3
- // import classNames from 'classnames';
4
-
5
- // const GameScoreboard = ({
6
- // game,
7
- // darkMode
8
- // }) => {
9
- // return (
10
- // <div
11
- // className={
12
- // classNames(
13
- // `articles-game-scoreboard card`,
14
- // { 'dark-mode': darkMode }
15
- // )
16
- // }
17
- // >
18
-
19
- // <div
20
- // className='card-header'
21
- // >
22
- // <div className='fw-bold mb-0'>
23
- // <i className='fad fa-gamepad'></i>
24
- // {game} Scoreboard
25
- // </div>
26
- // </div>
27
-
28
- // <div className='card-body p-2'>
29
- // <p>This is a test scoreboard component.</p>
30
- // <ul>
31
- // <li>Player 1: 100</li>
32
- // <li>Player 2: 200</li>
33
- // </ul>
34
- // </div>
35
-
36
- // <div
37
- // className='card-footer'
38
- // >
39
-
40
- // </div>
41
-
42
- // </div>
43
- // );
44
- // };
45
-
46
- // export default GameScoreboard;
47
-
48
1
  import { useEffect, useState } from 'react'
49
2
 
50
3
  // import axios from 'axios'
@@ -55,11 +8,12 @@ import { useEffect, useState } from 'react'
55
8
 
56
9
  // import ViewUserModal from '@/components/user/ViewUserModal/ViewUserModal';
57
10
  // import ArticlesSwitch from '../Articles/ArticlesSwitch';
58
- import ArticlesButton from './Button';
11
+ import ArticlesButton from '#root/src/components/UI/Button';
59
12
 
60
- import useGameScoreboard from './hooks/useGameScoreboard';
13
+ // import useGameScoreboard from '#root/src/hooks/Games/useGameScoreboard';
14
+ import useGameScoreboard from '#root/src/hooks/Games/useGameScoreboard';
61
15
 
62
- import "../styles/components/GameScoreboard.scss";
16
+ import "#root/src/styles/components/GameScoreboard.scss";
63
17
 
64
18
  function GameScoreboard({ game, reloadScoreboard, setReloadScoreboard }) {
65
19
 
@@ -1,4 +1,4 @@
1
- import ArticlesButton from "./Button";
1
+ import ArticlesButton from "#root/src/components/UI/Button";
2
2
 
3
3
  export default function ReturnToLauncherButton() {
4
4
 
@@ -11,6 +11,8 @@ export default function ReturnToLauncherButton() {
11
11
 
12
12
  // const router = useRouter()
13
13
 
14
+ if (typeof window === "undefined") return
15
+
14
16
  if (!launcher_mode) {
15
17
  return (
16
18
  <ArticlesButton
File without changes
File without changes
File without changes
File without changes