Skip to content

Commit

Permalink
Build/ Back to app + v4.10 (#162)
Browse files Browse the repository at this point in the history
* v4.8.0

* Designate rfcs.emberjs.com as the source of truth for RFCs

* Update index.md

* Add dictionary changes

* Add formatters

* Fix errors

* stop outputting `no issues found` on every file

* Remove `ember-gestures` addon recommendation

`ember-gestures` and its dependency, `ember-hammertime`, are no longer maintained and do not function at all on recent versions of Ember.

Refs:
- html-next/ember-gestures#139
- html-next/ember-hammertime#103

* v4.9.0

* Update setupTest function imports

* Add SkoebaSteve's changes to other guides versions (#1890)

SkoebaSteve updated the helpers content for v4.5
to cover how to use local helpers. This commit copies
those changes into more recent guides versions as well.

Co-authored-by: Steef Janssen <[email protected]>

Co-authored-by: Steef Janssen <[email protected]>

* controllers: fix broken link to API docs

The link to the Controller API docs is broken, so when anyone clicks it
they'll be met with a 404 error. Let's fix up that link so that the user
navigates to the top level of the Controller API docs instead (as this
link did up until 4.8).

This closes ember-learn/guides-source#1880.

* Update autotracking in-depth guides to use @cached decorator (#1886) (#1887)

* v4.10.0 (#1892)

* setup: remove all historical versions

* feat: setup project to use guide-sources internally (#4)

* feat: setup project to use guide-sources internally

* fix: apply suggestions from code review

Co-authored-by: Marine Dunstetter <[email protected]>

Co-authored-by: Marine Dunstetter <[email protected]>

* Docs/ update and translate `README.md` (#5)

* docs: update readme.md

* docs: add LISEZMOI.md

* docs: apply review suggestions to lisezmoi.md

Co-authored-by: MrChocolatine <[email protected]>

Co-authored-by: MrChocolatine <[email protected]>

* Checkout upstream and go back to a full app

Co-authored-by: Jared Galanis <[email protected]>
Co-authored-by: Peter Wagenet <[email protected]>
Co-authored-by: NullVoxPopuli <[email protected]>
Co-authored-by: Chris Manson <[email protected]>
Co-authored-by: David Taylor <[email protected]>
Co-authored-by: Jen Weber <[email protected]>
Co-authored-by: Steef Janssen <[email protected]>
Co-authored-by: Geordan Neukum <[email protected]>
Co-authored-by: Dan Knutsen <[email protected]>
Co-authored-by: Anne-Greeth Schot-van Herwijnen <[email protected]>
Co-authored-by: Guillaume Gérard <[email protected]>
Co-authored-by: MrChocolatine <[email protected]>
  • Loading branch information
13 people authored Jan 27, 2023
1 parent d9e1b54 commit e5bdb9e
Show file tree
Hide file tree
Showing 321 changed files with 61,722 additions and 4,238 deletions.
9 changes: 9 additions & 0 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
}
21 changes: 21 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/
/public/assets/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
66 changes: 66 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
'ember/no-jquery': 'error'
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js',
'server/**/*.js'
],
parserOptions: {
sourceType: 'script'
},
env: {
browser: false,
node: true
}
},
// node tests
{
files: [
'node-tests/**/*.js'
],
env: {
node: true,
mocha: true
},
parserOptions: {
ecmaVersion: 2018
},
rules: {
"func-names": 0,
"prefer-arrow-callback": 0,
"no-unused-expressions": 0
},
}
]
};
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,5 @@ jobs:
- name: Install dependencies
run: npm install

- name: Setup
run: npm run setup

- name: Test
run: npm run test:node
11 changes: 11 additions & 0 deletions .local.dic
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*NPM
*google
2FA
30KB
Expand Down Expand Up @@ -178,16 +179,22 @@ chainable
cheatsheet
checkboxes
checksum/S
coc-ember
codebase/S
codemod
codemods
CoffeeScript
ColorSafe
checksum/S
componentized
composable
config
configPath
cron
customizable
customizations
D3
DAP
dasherize
dasherized
datepicker
Expand Down Expand Up @@ -245,6 +252,7 @@ first
focusability
focusable
formatter
formatters
front-end
frontend/S
fullname
Expand Down Expand Up @@ -295,6 +303,7 @@ linting
localhost:4200
lockfile/S
lookups
LSP
md5
minifi/DR
minification
Expand Down Expand Up @@ -399,6 +408,8 @@ template-lifecycle-dom-and-modifiers
templating
todo
todos
treesitter
triple-backtick
tooltip
trackable
transitionTo
Expand Down
1 change: 1 addition & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-env node */
const unified = require("unified");
const read = require("fs").readFileSync;
const dictionaryFr = require("dictionary-fr");
Expand Down
9 changes: 9 additions & 0 deletions .template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

module.exports = {
extends: 'octane',
rules: {
'no-implicit-this': false,
'no-curly-component-invocation': false
}
};
3 changes: 3 additions & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
6 changes: 3 additions & 3 deletions LISEZMOI.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Ember Guides en français

Ce répertoire contient la traduction française du guide officiel Ember.js :

- [Ember.js Guides, site web](https://github.com/ember-learn/ember-website),
- [Ember Guides Source](https://github.com/ember-learn/guides-source)

Expand All @@ -18,7 +19,7 @@ Le contenu du Guide Ember est écrit en Markdown. En général, votre PR ne devr

## Développement local

**NOTE:** Ce projet utilise [Volta](https://volta.sh/) pour s'assurer que la bonne version de Node.js et de NPM est utilisée lors du développement local.
**NOTE:** Ce projet utilise [Volta](https://volta.sh/) pour s'assurer que la bonne version de Node.js et de npm est utilisée lors du développement local.

Pour exécuter l'app Guide Ember localement, saisissez ces commandes dans votre terminal :

Expand All @@ -27,8 +28,7 @@ git clone git://github.com/DazzlingFugu/ember-fr-guides-source.git

cd ember-fr-guides-source
npm install
npm run setup
npm start
ember serve
```

Ensuite, visitez [http://localhost:4200](http://localhost:4200) dans votre navigateur.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Ember Guides French Source

This repository contains the French translation of the official Ember.js Guides:

- [Ember.js Guides website (English)](https://github.com/ember-learn/ember-website),
- [Ember Guides Source (English)](https://github.com/ember-learn/guides-source)

Expand All @@ -14,7 +15,7 @@ First-time contributors are encouraged to look at issues that are labeled **help

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for additional instructions on how to format your work and submit a PR.

The Ember French Guides content is written in Markdown. In general, your PR should make edits to only the files in the `/guides/release` directory, which corresponds to the latest version of Ember.
The Ember French Guides content is written in Markdown. In general, your PR should make edits to only the files in the `/guides/release` directory, which corresponds to the latest version of Ember.

## Local development

Expand All @@ -27,8 +28,7 @@ git clone git://github.com/DazzlingFugu/ember-fr-guides-source.git

cd ember-fr-guides-source
npm install
npm run setup
npm start
ember serve
```

Afterwards, visit [http://localhost:4200](http://localhost:4200) in your browser.
Expand Down Expand Up @@ -57,7 +57,7 @@ npm run test:node

# Run all test scripts in `/node-tests/local`. In particular,
# this command checks all external links in the release version
# of the Guides and across all versions of the official Guides.
# of the Guides and across all versions of the official Guides.
npm run test:node-local

# When checking external links in the release version, don't
Expand Down
12 changes: 12 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

export default class App extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Resolver = Resolver;
}

loadInitializers(App, config.modulePrefix);
62 changes: 62 additions & 0 deletions app/components/table-of-contents.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{#each @data as |page|}}
{{#unless page.skipToc}}
{{#if (includes page.id "toc-heading")}}
<li class="toc-heading {{this.tocLevel}}">
{{page.title}}
</li>

{{else if page.pages}}
<li class="toc-group {{this.tocLevel}}">
<CpPanel
@open={{eq @currentSection.id page.id}}
as |panel|
>
{{#if this.fastboot.isFastBoot}}
<LinkTo
@activeClass="selected"
@model={{page.id}}
@route="version.show"
class="cp-Panel-toggle"
data-test-toc-link={{page.title}}
>
{{page.title}}
</LinkTo>
{{else}}
<panel.toggle
data-test-toc-title={{page.title}}
>
{{page.title}}
</panel.toggle>
{{/if}}

<panel.body>
<TableOfContents
@currentPage={{@currentPage}}
@data={{page.pages}}
@level={{inc (or @level 0)}}
/>
</panel.body>
</CpPanel>
</li>

{{else}}
<li
class="
toc-link
{{this.tocLevel}}
{{if (eq @currentPage.url page.url) "selected"}}
"
>
<LinkTo
@activeClass="selected"
@model={{page.url}}
@route="version.show"
data-test-toc-link={{page.title}}
>
{{page.title}}
</LinkTo>
</li>

{{/if}}
{{/unless}}
{{/each}}
5 changes: 5 additions & 0 deletions app/helpers/includes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { helper } from '@ember/component/helper';

export default helper(function includes([string = '', query]) {
return string.includes(query);
});
28 changes: 28 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:image" content="https://blog.emberjs.com/images/logos/e-icon.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@emberjs" />
<meta name="twitter:image" content="https://blog.emberjs.com/images/logos/e-icon.png" />

{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/ember-fr-guides-source.css">
<link rel="shortcut icon" href="/images/favicon.png" />

{{content-for "head-footer"}}
</head>
<body>
{{content-for "body"}}

<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/ember-fr-guides-source.js"></script>

{{content-for "body-footer"}}
</body>
</html>
23 changes: 23 additions & 0 deletions app/initializers/patch-page-service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import PageService from 'ember-fr-guides-source/services/page';

Object.defineProperty(PageService.prototype, 'pages', {
get() {
return this._pages;
},

set(pages) {
if (pages) {
this._pages = pages.filter(page => {
const pageId = page.id ?? '';

return !pageId.includes('toc-heading');
});
}
}
});

export function initialize() {}

export default {
initialize,
};
Loading

0 comments on commit e5bdb9e

Please sign in to comment.