Change app/ to src/ in configuration files etc

This commit is contained in:
Alex Gleason 2023-09-18 16:07:02 -05:00
parent 7d17c87fc7
commit 7df9a91e37
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
10 changed files with 20 additions and 20 deletions

View File

@ -49,7 +49,7 @@ module.exports = {
], ],
'import/resolver': { 'import/resolver': {
node: { node: {
paths: ['app'], paths: ['src'],
}, },
}, },
polyfills: [ polyfills: [
@ -296,7 +296,7 @@ module.exports = {
{ {
// Only enforce JSDoc comments on UI components for now. // Only enforce JSDoc comments on UI components for now.
// https://www.npmjs.com/package/eslint-plugin-jsdoc // https://www.npmjs.com/package/eslint-plugin-jsdoc
files: ['app/soapbox/components/ui/**/*'], files: ['src/soapbox/components/ui/**/*'],
rules: { rules: {
'jsdoc/require-jsdoc': ['error', { 'jsdoc/require-jsdoc': ['error', {
publicOnly: true, publicOnly: true,

View File

@ -72,7 +72,7 @@ lint-sass:
# changes: # changes:
# - "**/*.js" # - "**/*.js"
# - "**/*.json" # - "**/*.json"
# - "app/soapbox/**/*" # - "src/soapbox/**/*"
# - "webpack/**/*" # - "webpack/**/*"
# - "custom/**/*" # - "custom/**/*"
# - "jest.config.cjs" # - "jest.config.cjs"

View File

@ -4,5 +4,5 @@
"*.mjs": "eslint --cache", "*.mjs": "eslint --cache",
"*.ts": "eslint --cache", "*.ts": "eslint --cache",
"*.tsx": "eslint --cache", "*.tsx": "eslint --cache",
"app/styles/**/*.scss": "stylelint" "src/styles/**/*.scss": "stylelint"
} }

View File

@ -1,7 +1,7 @@
import { danger, warn, message } from 'danger'; import { danger, warn, message } from 'danger';
// App changes // App changes
const app = danger.git.fileMatch('app/soapbox/**'); const app = danger.git.fileMatch('src/soapbox/**');
// Docs changes // Docs changes
const docs = danger.git.fileMatch('docs/**/*.md'); const docs = danger.git.fileMatch('docs/**/*.md');
@ -18,24 +18,24 @@ if (app.edited && !changelog.edited) {
} }
// UI components // UI components
const uiCode = danger.git.fileMatch('app/soapbox/components/ui/**'); const uiCode = danger.git.fileMatch('src/soapbox/components/ui/**');
const uiTests = danger.git.fileMatch('app/soapbox/components/ui/**/__tests__/**'); const uiTests = danger.git.fileMatch('src/soapbox/components/ui/**/__tests__/**');
if (uiCode.edited && !uiTests.edited) { if (uiCode.edited && !uiTests.edited) {
warn('You have UI changes (`soapbox/components/ui`) without tests.'); warn('You have UI changes (`soapbox/components/ui`) without tests.');
} }
// Actions // Actions
const actionsCode = danger.git.fileMatch('app/soapbox/actions/**'); const actionsCode = danger.git.fileMatch('src/soapbox/actions/**');
const actionsTests = danger.git.fileMatch('app/soapbox/actions/**__tests__/**'); const actionsTests = danger.git.fileMatch('src/soapbox/actions/**__tests__/**');
if (actionsCode.edited && !actionsTests.edited) { if (actionsCode.edited && !actionsTests.edited) {
warn('You have actions changes (`soapbox/actions`) without tests.'); warn('You have actions changes (`soapbox/actions`) without tests.');
} }
// Reducers // Reducers
const reducersCode = danger.git.fileMatch('app/soapbox/reducers/**'); const reducersCode = danger.git.fileMatch('src/soapbox/reducers/**');
const reducersTests = danger.git.fileMatch('app/soapbox/reducers/**__tests__/**'); const reducersTests = danger.git.fileMatch('src/soapbox/reducers/**__tests__/**');
if (reducersCode.edited && !reducersTests.edited) { if (reducersCode.edited && !reducersTests.edited) {
warn('You have reducer changes (`soapbox/reducers`) without tests.'); warn('You have reducer changes (`soapbox/reducers`) without tests.');

View File

@ -71,7 +71,7 @@ For example:
} }
``` ```
See `app/soapbox/utils/features.js` for the full list of features. See `src/soapbox/utils/features.js` for the full list of features.
### Embedded app (`custom/app.json`) ### Embedded app (`custom/app.json`)

View File

@ -48,7 +48,7 @@ Typically checks are done against `BACKEND_NAME` and `VERSION`.
The version string is similar in purpose to a [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) string. The version string is similar in purpose to a [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) string.
The format was first invented by Pleroma, but is now widely used, including by Pixelfed, Mitra, and Soapbox BE. The format was first invented by Pleroma, but is now widely used, including by Pixelfed, Mitra, and Soapbox BE.
See [`features.ts`](https://gitlab.com/soapbox-pub/soapbox/-/blob/main/app/soapbox/utils/features.ts) for the complete list of features. See [`features.ts`](https://gitlab.com/soapbox-pub/soapbox/-/blob/main/src/soapbox/utils/features.ts) for the complete list of features.
## Forks of other software ## Forks of other software
@ -73,4 +73,4 @@ For Pleroma forks, the fork name should be in the compat section (eg Soapbox BE)
## Adding support for a new backend ## Adding support for a new backend
If the backend conforms to the above format, please modify [`features.ts`](https://gitlab.com/soapbox-pub/soapbox/-/blob/main/app/soapbox/utils/features.ts) and submit a merge request to enable features for your backend! If the backend conforms to the above format, please modify [`features.ts`](https://gitlab.com/soapbox-pub/soapbox/-/blob/main/src/soapbox/utils/features.ts) and submit a merge request to enable features for your backend!

View File

@ -29,7 +29,7 @@
"test:all": "${npm_execpath} run test:coverage && ${npm_execpath} run lint", "test:all": "${npm_execpath} run test:coverage && ${npm_execpath} run lint",
"lint": "${npm_execpath} run lint:js && ${npm_execpath} run lint:sass", "lint": "${npm_execpath} run lint:js && ${npm_execpath} run lint:sass",
"lint:js": "npx eslint --ext .js,.jsx,.cjs,.mjs,.ts,.tsx . --cache", "lint:js": "npx eslint --ext .js,.jsx,.cjs,.mjs,.ts,.tsx . --cache",
"lint:sass": "npx stylelint app/styles/**/*.scss", "lint:sass": "npx stylelint src/styles/**/*.scss",
"prepare": "husky install" "prepare": "husky install"
}, },
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",

View File

@ -2,7 +2,7 @@ const { parseColorMatrix } = require('./tailwind/colors.cjs');
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
module.exports = { module.exports = {
content: ['./app/**/*.{html,js,ts,tsx}', './custom/instance/**/*.html', './app/index.ejs'], content: ['./src/**/*.{html,js,ts,tsx}', './custom/instance/**/*.html', './src/index.html'],
darkMode: 'class', darkMode: 'class',
theme: { theme: {
screens: { screens: {

View File

@ -1,6 +1,6 @@
{ {
"compilerOptions": { "compilerOptions": {
"baseUrl": "app/", "baseUrl": "src/",
"outDir": "build/", "outDir": "build/",
"sourceMap": true, "sourceMap": true,
"strict": true, "strict": true,

View File

@ -11,7 +11,7 @@ import vitePluginRequire from 'vite-plugin-require';
import { viteStaticCopy } from 'vite-plugin-static-copy'; import { viteStaticCopy } from 'vite-plugin-static-copy';
export default defineConfig({ export default defineConfig({
root: 'app', root: 'src',
build: { build: {
// Relative to the root // Relative to the root
outDir: '../dist', outDir: '../dist',
@ -79,8 +79,8 @@ export default defineConfig({
], ],
resolve: { resolve: {
alias: [ alias: [
{ find: 'soapbox', replacement: path.resolve(__dirname, 'app', 'soapbox') }, { find: 'soapbox', replacement: path.resolve(__dirname, 'src', 'soapbox') },
{ find: 'assets', replacement: path.resolve(__dirname, 'app', 'assets') }, { find: 'assets', replacement: path.resolve(__dirname, 'src', 'assets') },
], ],
}, },
assetsInclude: ['**/*.oga'], assetsInclude: ['**/*.oga'],