Skip to content

Commit

Permalink
fix: netlify (#68)
Browse files Browse the repository at this point in the history
* fix: netlify

* fix: netlify

* fix: netlify

* fix: netlify

* fix: netlify

* fix: netlify

* fix: netlify
  • Loading branch information
yann510 authored Sep 12, 2023
1 parent 031a24d commit dd3e0e6
Show file tree
Hide file tree
Showing 42 changed files with 192 additions and 23 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,16 @@ jobs:
if: github.ref == 'refs/heads/master'
run: npm run benchmark

- name: Release + Deploy
- name: Release + Publish package
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: npm run semantic-release:all

- name: Deploy to netlify
if: github.ref == 'refs/heads/master'
run: npm run netlify:deploy
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
2 changes: 1 addition & 1 deletion benchmark/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface BenchmarkResult {
runsSampled: number
}

const benchmarkResultPath = `${__dirname}/../../../../apps/web-app/src/assets/benchmarkResults.json`
const benchmarkResultPath = `${__dirname}/../../../../web-app/src/assets/benchmarkResults.json`

async function main() {
const packageVersions: string[] = JSON.parse(execSync('npm view ss-search versions --json').toString())
Expand Down
157 changes: 157 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
"version": "1.8.1",
"license": "MIT",
"repository": "https://github.com/yann510/ss-search",
"private": true,
"engines": {
"node": ">=18 <19"
},
"scripts": {
"format:all": "prettier --write --config .prettierrc \"**/*.{ts,tsx,js,json}\"",
"lint:all": "nx run-many --target=lint --all",
"test:all": "nx run-many --target=test --all",
"build:all": "nx run-many --target=build --all",
"semantic-release:all": "nx run-many --target=semantic-release --all",
"benchmark": "nx run benchmark:build && node dist/benchmark/main.js",
"web-app:serve": "nx run web-app:serve"
"web-app:serve": "nx run web-app:serve",
"netlify:deploy": "netlify deploy --prod --dir=dist/web-app"
},
"private": true,
"dependencies": {
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
Expand Down Expand Up @@ -78,6 +82,7 @@
"jest": "29.6.4",
"jest-environment-jsdom": "29.6.4",
"jest-environment-node": "^29.4.1",
"netlify": "13.1.10",
"nx": "16.8.1",
"nx-cloud": "latest",
"prettier": "2.8.8",
Expand Down
2 changes: 1 addition & 1 deletion apps/web-app/.eslintrc.json → web-app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
"extends": ["plugin:@nx/react", "../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
Expand Down
4 changes: 2 additions & 2 deletions apps/web-app/jest.config.ts → web-app/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-disable */
export default {
displayName: 'web-app',
preset: '../../jest.preset.js',
preset: '../jest.preset.js',
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/react/babel'] }],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/apps/web-app',
coverageDirectory: '../coverage/web-app',
}
18 changes: 9 additions & 9 deletions apps/web-app/project.json → web-app/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "web-app",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/web-app/src",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "web-app/src",
"projectType": "application",
"targets": {
"build": {
Expand All @@ -10,11 +10,11 @@
"defaultConfiguration": "production",
"options": {
"target": "web",
"outputPath": "dist/apps/web-app",
"main": "apps/web-app/src/main.tsx",
"tsConfig": "apps/web-app/tsconfig.app.json",
"rspackConfig": "apps/web-app/rspack.config.js",
"assets": ["apps/web-app/src/favicon.ico", "apps/web-app/src/assets"]
"outputPath": "dist/web-app",
"main": "web-app/src/main.tsx",
"tsConfig": "web-app/tsconfig.app.json",
"rspackConfig": "web-app/rspack.config.js",
"assets": ["web-app/src/favicon.ico", "web-app/src/assets"]
},
"configurations": {
"development": {
Expand Down Expand Up @@ -43,14 +43,14 @@
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/web-app/**/*.{ts,tsx,js,jsx}"]
"lintFilePatterns": ["web-app/**/*.{ts,tsx,js,jsx}"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/web-app/jest.config.ts",
"jestConfig": "web-app/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/apps/web-app/src/assets/manifest.jsonsrc/assets/manifest.json" />
<link rel="manifest" href="%PUBLIC_URL%/web-app/src/assets/manifest.jsonsrc/assets/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/web-app/src/index.html → web-app/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<base href="/" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/x-icon" href='favicon.ico' />
</head>
<body>
<div id="root"></div>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import { CircularProgress } from '@mui/material'
import lunr from 'lunr'
import * as JsSearch from 'js-search'
import { BackdropProgress } from '../components/backdrop-loader'
import { indexDocuments, search, tokenize } from '@yann510/ss-search'
import { makeStyles } from 'tss-react/mui'

import fuzzysort from 'fuzzysort'
import Flexsearch from 'flexsearch'
import { indexDocuments, search, tokenize } from '@yann510/ss-search'

interface BenchmarkResult {
libraryName: string
Expand Down
Loading

0 comments on commit dd3e0e6

Please sign in to comment.