No description
- JavaScript 71.3%
- Handlebars 15.8%
- SCSS 10%
- HTML 2%
- CSS 0.9%
Remove default tags. We generate our own from the backend. See merge request pleroma/fedi-fe!81 |
||
|---|---|---|
| .git-hooks | ||
| app | ||
| config | ||
| kss-theme | ||
| lib | ||
| mirage | ||
| public | ||
| service-worker | ||
| tests | ||
| translations | ||
| vendor | ||
| .editorconfig | ||
| .ember-cli | ||
| .envrc | ||
| .eslintignore | ||
| .eslintrc.js | ||
| .eucrc.js | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .ignore | ||
| .prettierrc.js | ||
| .sassdocrc.json | ||
| .stylelintignore | ||
| .stylelintrc.js | ||
| .template-lintrc.js | ||
| .travis.yml | ||
| .watchmanconfig | ||
| AGPL-3 | ||
| bors.toml | ||
| COPYING | ||
| DEBUGGING.md | ||
| ember-cli-build.js | ||
| kss-config.json | ||
| netlify.toml | ||
| package.json | ||
| README.md | ||
| spellcheck-translations.js | ||
| testem.js | ||
| yarn.lock | ||
Fedi-FE
PWA client for Pleroma instances. Built with Ember.
Prerequisites
You will need the following things properly installed on your computer.
Setup
git clone https://git.pleroma.social/pleroma/fedi-fe.gitcd fedi-feyarn install
Deploying a FediFE build to Pleroma
- Requires Pleroma 2.1 or later
- Update your Pleroma server configuration e.g.,
config :pleroma, :frontends, primary: %{"name" => "fedife", "ref" => "dist"} - run
- yarn build
- copy the
distdirectory to yourstatic_dir, e.g., instance/static/frontends/fedife/dist - Start your Pleroma instance
Running / Development
npm start- Visit your app at http://localhost:4200.
Note: Because I like working with real data and an API for this already exists, I have our Mirage server turned off in development.
Developing against local pleroma-api
- Ensure you have postgres installed locally,
- If you dont, you can easily install via homebrew + run
/usr/local/opt/postgres/bin/createuser -s postgresto create the default postgres user - Clone the api: https://git.pleroma.social/pleroma/pleroma
- run
mix deps.getmix deps.compilemix ecto.createmix ecto.migratemix phx.server
Consuming existing Phoenix instance
API_BASE_URL=http://localhost:4000 npm start
Performance and Error monitoring.
Right now, during our beta phases, we have some perf monitoring and error tracking enabled. It's only active if SENTRY_DSN is present during build time. See DEBUGGING.md for more information.
If you want to rip it all out, you will want to remove the sentry service, the sentry deps from package.json, and the ember-user-performance-monitoring lib from package.json.
SVG's
- We are using SVG Jar.
- Just add an SVG to the public directory, restart the development server.
- Invoke SVG's like so:
{{svg-jar "dockyard-logo" width="40px" height="40px"}}
Styleguides
KSS
- We are using KSS styleguides.
- They are automatically created when running the development server.
- The server will spit out a file path to open the generated styleguide.
- Open that file in your browser. (paste that path into your browsers url bar)
- The styleguide will rebuild on changes within
app/styles. - To see the new changes, refresh the page.
Sassdoc
- We are using SASSDOC.
- They are automatically created when running the development server.
- The server will spit out a file path to open the generated docs.
- Open that file in your browser. (paste that path into your browser url bar);
- The docs will rebuild on changes within
app/styles. - TO see the new changes, refresh the page
Code Generators
Make use of the many generators for code, try ember help generate for more details
Tests
Running Tests
ember examember exam --serverember exam --filter='acceptance'
See Ember Exam
Writing Tests
- Network/Api - Mirage
- Stubs/Spys - Sinon
- Selecting Dom Elements - ember-test-selectors
Linting
yarn lint:hbsyarn lint:jsyarn lint:js --fix
Building
ember build(development)ember build --environment production(production)
Debugging bundle size
- After starting the ember server, visit
https://localhost:4200/_analyzeto view the bundle analyzer
Debugging service worker
- Navigate to chrome://serviceworker-internals/
Further Reading / Useful Links
- Pleroma
- Activity Pub
- ember.js
- ember-cli
- PWA's
- Development Browser Extensions
