* turn back remark.image
* fix readme
* remove ts-ignore
This commit is contained in:
Pavel Mineev
2021-01-12 13:39:26 -06:00
committed by Umputun
parent fb60840f9f
commit 67188880a7
5 changed files with 7 additions and 11 deletions
+2 -3
View File
@@ -9,7 +9,6 @@
### CSS Styles
- although styles have `scss` extension, it is actually pack of post-css plugins, so syntax differs, for example in `calc` function.
- now we are migrating to css-modules and this is recomended way to stylization. A file with styles should be named like `component.module.css`
- old component styles use BEM notation (at least it should): `block__element_modifier`. Also there are `mix` classes: `block_modifier`.
- new way to naming CSS selectors is camel-case like `blockElemenModifier` and use `classnames` to combine it
@@ -20,12 +19,12 @@
- imports for typescript, javascript files should be without extension: `./index`, not `./index.ts`
- if file resides in the same directory or in subdirectory import should be relative: `./types/something`
- otherwise it should start from ``namespace:`common/store`which mapped to`/appcommon/store.ts` in webpack, tsconfig and jest
- otherwise it should be imported by absolute path relative to `src` folder like `common/store` which mapped to `./app/common/store.ts` in webpack, tsconfig and jest
### Testing
- project uses `jest` as test harness.
- jest check files that match regex `\.test\.(j|t)s(x?)$`, i.e `comment.test.tsx`, `comment.test.js`
- jest check files that match regex `\.(test|spec)\.ts(x?)$`, i.e `comment.test.tsx`, `comment.spec.ts`
- tests are running on push attempt
- example tests can be found in `./app/store/user/reducers.test.ts`, `./app/components/auth-panel/auth-panel.test.tsx`
+2 -3
View File
@@ -1,7 +1,6 @@
// @ts-ignore
const mock: typeof import('common/constants') = {
const constantsMock: typeof import('common/constants') = {
...jest.requireActual('common/constants'),
BASE_URL: 'https://demo.remark42.com/',
};
module.exports = mock;
module.exports = constantsMock;
+2 -3
View File
@@ -1,5 +1,4 @@
// @ts-ignore
const mock: typeof import('common/settings') = {
const settingsMock: typeof import('common/settings') = {
...jest.requireActual('common/settings'),
siteId: 'remark',
pageTitle: 'remark test',
@@ -17,4 +16,4 @@ const mock: typeof import('common/settings') = {
},
};
module.exports = mock;
module.exports = settingsMock;
+1 -2
View File
@@ -1,5 +1,4 @@
{
"private": true,
"name": "remark42",
"version": "0.16.0",
"license": "MIT",
@@ -18,7 +17,7 @@
"lint:eslint": "eslint --max-warnings=0 '**/*.{ts?(x),js}'",
"lint:stylelint": "stylelint 'app/**/*.css' 'templates/**'",
"size": "cross-env NODE_ENV=production run-s build check:size",
"prettier": "prettier --write './**/*.{js,ts,tsx,css}'",
"prettier": "prettier --write './**/*.{js,ts,tsx,css,html}'",
"translation:extract": "formatjs extract --out-file=./extracted-messages/messages.json '**/!(*.d).ts?(x)'",
"translation:generate": "node ./tasks/generateTranslations.js",
"translation:check": "node ./tasks/checkTranslations.js"
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB