Skip to content

Commit

Permalink
[C] update package
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Dec 8, 2023
1 parent 9cca27a commit 7d697af
Show file tree
Hide file tree
Showing 8 changed files with 596 additions and 31 deletions.
20 changes: 20 additions & 0 deletions .clean-publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"packageManager": "yarn",
"tempDir": "tempPublish",
"files": [
"vite.config.js",
"tsconfig.json",
"tsconfig.node.json",
".gitignore",
"src",
".github",
"example",
"types",
".eslintignore",
".eslintrc.js",
".node-version",
".nvmrc",
".stylelintrc.js",
"babel.config.js"
]
}
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"dependencies": {
"modern-css-reset": "^1.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"space-surveyors": "file:../"
},
"devDependencies": {
"@types/react": "^18.0.17",
Expand Down
6 changes: 0 additions & 6 deletions example/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineConfig } from "vite";
import { resolve } from "path";
import react from "@vitejs/plugin-react";

const embeddedHtmlFallbackPlugin = {
Expand All @@ -22,10 +21,5 @@ export default defineConfig({
},
},
},
resolve: {
alias: {
"space-surveyors": resolve(__dirname, "../dist/space-surveyors.js"),
},
},
plugins: [react(), embeddedHtmlFallbackPlugin],
});
499 changes: 496 additions & 3 deletions example/yarn.lock

Large diffs are not rendered by default.

43 changes: 25 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@
"start": "tsc && vite build --watch --mode development",
"prepare": "tsc && vite build",
"predeploy": "yarn prepare && cd example && yarn build",
"deploy": "gh-pages -d example/dist"
"deploy": "gh-pages -d example/dist",
"publish:clean": "rm -r tempPublish & yarn prepare && clean-publish",
"publish:local": "rm -r tempPublish & yarn prepare && clean-publish --without-publish"
},
"files": [
"dist"
"dist",
"README.md",
"LICENSE"
],
"main": "./dist/space-surveyors.umd.cjs",
"types": "./dist/types/index.d.ts",
Expand All @@ -33,39 +37,42 @@
"react": ">=16",
"react-dom": ">=16"
},
"devDependencies": {
"@babel/preset-react": "^7.18.6",
"@castiron/eslint-config": "^0.0.1",
"dependencies": {
"@castiron/style-mixins": "^1.0.6",
"@types/howler": "^2.2.7",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@types/regenerator-runtime": "^0.13.1",
"@types/styled-components": "^5.1.25",
"@vitejs/plugin-react": "^2.0.1",
"babel-plugin-styled-components": "^2.0.7",
"copy-to-clipboard": "^3.3.2",
"detect-collisions": "^6.4.1",
"focus-trap": "^7.0.0",
"gh-pages": "^4.0.0",
"howler": "^2.2.3",
"i18next": "^21.9.1",
"i18next-browser-languagedetector": "^6.1.5",
"prop-types": "^15.8.1",
"random-js-no-node": "^2.1.0-b",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-game-engine": "^1.1.0",
"react-i18next": "^11.18.6",
"react-inlinesvg": "^3.0.0",
"react-share": "^4.4.0",
"regenerator-runtime": "^0.13.9",
"screenfull": "^6.0.2",
"styled-components": "^5.3.5",
"typescript": "^4.7.3",
"use-resize-observer": "^9.0.2",
"vite": "^3.0.7",
"vite-plugin-dts": "^1.4.1",
"weighted": "^1.0.0"
},
"devDependencies": {
"@babel/preset-react": "^7.18.6",
"@castiron/eslint-config": "^0.0.1",
"@types/howler": "^2.2.7",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@types/regenerator-runtime": "^0.13.1",
"@types/styled-components": "^5.1.25",
"@vitejs/plugin-react": "^2.0.1",
"babel-plugin-styled-components": "^2.0.7",
"clean-publish": "^4.2.0",
"gh-pages": "^4.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.7.3",
"vite": "^3.0.7",
"vite-plugin-dts": "^1.4.1"
}
}
1 change: 1 addition & 0 deletions src/assets/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"share_copy": "Descubrí {{total}} objetos en los #SpaceSurveyors del Observatorio Rubin \r\n\r\n🪨 - {{asteroid}} ☄️ - {{comet}} 🌌 - {{galaxy}} ⭐ - {{star}} 💥 - {{supernova}}\r\n\r\n{{url}}",
"timer": "Tiempo restante: {{remaining}}",
"faq": {
"title": "Aprende más sobre Space Surveyors",
"link": "https://rubinobservatory.org/es/explore/space-surveyors"
}
}
25 changes: 24 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,30 @@ export default defineConfig({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["react", "react-dom"],
external: [
"@castiron/style-mixins",
"copy-to-clipboard",
"detect-collisions",
"focus-trap",
"howler",
"i18next",
"i18next-browser-languagedetector",
"next/link",
"prop-types",
"random-js-no-node",
"react",
"react/jsx-runtime",
"react-dom",
"react-game-engine",
"react-i18next",
"react-inlinesvg",
"react-share",
"regenerator-runtime",
"screenfull",
"styled-components",
"use-resize-observer",
"weighted",
],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
Expand Down
30 changes: 28 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,16 @@ classnames@^2.2.5:
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e"
integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==

clean-publish@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/clean-publish/-/clean-publish-4.2.0.tgz#f72134437d4367962da02711099c70d134147a71"
integrity sha512-dqZF5y6KtlkYhbnJoXiOCP4L1TPdI7HtuDysslUrbI8vLPu65ZjVO3pu5xp4qH0X2cWdDN/La04woe6fg4LNSw==
dependencies:
cross-spawn "^7.0.3"
fast-glob "^3.2.12"
lilconfig "^2.1.0"
micromatch "^4.0.5"

code-block-writer@^11.0.0:
version "11.0.3"
resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-11.0.3.tgz#9eec2993edfb79bfae845fbc093758c0a0b73b76"
Expand Down Expand Up @@ -983,7 +993,7 @@ core-js-pure@^3.20.2:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.24.1.tgz#8839dde5da545521bf282feb7dc6d0b425f39fd3"
integrity sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg==

cross-spawn@^7.0.2:
cross-spawn@^7.0.2, cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
Expand Down Expand Up @@ -1566,6 +1576,17 @@ fast-glob@^3.2.11:
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-glob@^3.2.12:
version "3.3.2"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
Expand Down Expand Up @@ -2126,6 +2147,11 @@ levn@^0.4.1:
prelude-ls "^1.2.1"
type-check "~0.4.0"

lilconfig@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52"
integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==

locate-path@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
Expand Down Expand Up @@ -2191,7 +2217,7 @@ merge2@^1.3.0:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==

micromatch@^4.0.4:
micromatch@^4.0.4, micromatch@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
Expand Down

0 comments on commit 7d697af

Please sign in to comment.