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

View File

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

View File

@ -4,5 +4,5 @@
"*.mjs": "eslint --cache",
"*.ts": "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';
// App changes
const app = danger.git.fileMatch('app/soapbox/**');
const app = danger.git.fileMatch('src/soapbox/**');
// Docs changes
const docs = danger.git.fileMatch('docs/**/*.md');
@ -18,24 +18,24 @@ if (app.edited && !changelog.edited) {
}
// UI components
const uiCode = danger.git.fileMatch('app/soapbox/components/ui/**');
const uiTests = danger.git.fileMatch('app/soapbox/components/ui/**/__tests__/**');
const uiCode = danger.git.fileMatch('src/soapbox/components/ui/**');
const uiTests = danger.git.fileMatch('src/soapbox/components/ui/**/__tests__/**');
if (uiCode.edited && !uiTests.edited) {
warn('You have UI changes (`soapbox/components/ui`) without tests.');
}
// Actions
const actionsCode = danger.git.fileMatch('app/soapbox/actions/**');
const actionsTests = danger.git.fileMatch('app/soapbox/actions/**__tests__/**');
const actionsCode = danger.git.fileMatch('src/soapbox/actions/**');
const actionsTests = danger.git.fileMatch('src/soapbox/actions/**__tests__/**');
if (actionsCode.edited && !actionsTests.edited) {
warn('You have actions changes (`soapbox/actions`) without tests.');
}
// Reducers
const reducersCode = danger.git.fileMatch('app/soapbox/reducers/**');
const reducersTests = danger.git.fileMatch('app/soapbox/reducers/**__tests__/**');
const reducersCode = danger.git.fileMatch('src/soapbox/reducers/**');
const reducersTests = danger.git.fileMatch('src/soapbox/reducers/**__tests__/**');
if (reducersCode.edited && !reducersTests.edited) {
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`)

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 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
@ -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
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",
"lint": "${npm_execpath} run lint:js && ${npm_execpath} run lint:sass",
"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"
},
"license": "AGPL-3.0-or-later",

View File

@ -2,7 +2,7 @@ const { parseColorMatrix } = require('./tailwind/colors.cjs');
/** @type {import('tailwindcss').Config} */
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',
theme: {
screens: {

View File

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

View File

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