Skip to content

Commit

Permalink
Split test & docs app
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp committed Nov 27, 2023
1 parent d050190 commit bf229cf
Show file tree
Hide file tree
Showing 172 changed files with 3,021 additions and 605 deletions.
19 changes: 19 additions & 0 deletions docs/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
7 changes: 7 additions & 0 deletions docs/.ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": true
}
13 changes: 13 additions & 0 deletions docs/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# unconventional js
/blueprints/*/files/

# compiled output
/dist/

# misc
/coverage/
!.*
.*/

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

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
},
plugins: ['ember', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
overrides: [
// ts files
{
files: ['**/*.ts'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {},
},
// node files
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./lib/*/index.js',
'./server/**/*.js',
],
env: {
browser: false,
node: true,
},
extends: ['plugin:n/recommended'],
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
25 changes: 25 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# compiled output
/dist/
/declarations/

# dependencies
/node_modules/

# misc
/.env*
/.pnp*
/.eslintcache
/coverage/
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
10 changes: 10 additions & 0 deletions docs/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Prettier is also run from each package, so the ignores here
# protect against files that may not be within a package

# misc
!.*
.lint-todo/

# ember-try
/.node_modules.ember-try/
/pnpm-lock.ember-try.yaml
12 changes: 12 additions & 0 deletions docs/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

module.exports = {
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
8 changes: 8 additions & 0 deletions docs/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
5 changes: 5 additions & 0 deletions docs/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
5 changes: 5 additions & 0 deletions docs/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: 'recommended',
};
3 changes: 3 additions & 0 deletions docs/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["dist"]
}
56 changes: 56 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# docs

This README outlines the details of collaborating on this Ember application.
A short introduction of this app could easily go here.

## Prerequisites

You will need the following things properly installed on your computer.

* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with npm)
* [Ember CLI](https://cli.emberjs.com/release/)
* [Google Chrome](https://google.com/chrome/)

## Installation

* `git clone <repository-url>` this repository
* `cd docs`
* `npm install`

## Running / Development

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Code Generators

Make use of the many generators for code, try `ember help generate` for more details

### Running Tests

* `ember test`
* `ember test --server`

### Linting

* `npm run lint`
* `npm run lint:fix`

### Building

* `ember build` (development)
* `ember build --environment production` (production)

### Deploying

Specify what it takes to deploy your app.

## Further Reading / Useful Links

* [ember.js](https://emberjs.com/)
* [ember-cli](https://cli.emberjs.com/release/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
12 changes: 12 additions & 0 deletions docs/app/app.ts
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 'docs/config/environment';

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

loadInitializers(App, config.modulePrefix);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions docs/app/config/environment.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Type declarations for
* import config from 'docs/config/environment'
*/
declare const config: {
environment: string;
modulePrefix: string;
podModulePrefix: string;
locationType: 'history' | 'hash' | 'none';
rootURL: string;
APP: Record<string, unknown>;
};

export default config;
Empty file added docs/app/controllers/.gitkeep
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions docs/app/controllers/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Controller from '@ember/controller';

export default class extends Controller {}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added docs/app/helpers/.gitkeep
Empty file.
26 changes: 26 additions & 0 deletions docs/app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TestApp</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/docs.css">

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

<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/docs.js"></script>

<div id="ember-basic-dropdown-wormhole"></div>

{{content-for "body-footer"}}
</body>
</html>
Empty file added docs/app/models/.gitkeep
Empty file.
48 changes: 48 additions & 0 deletions docs/app/router.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import EmberRouter from '@ember/routing/router';
import config from 'docs/config/environment';

const Router = class extends EmberRouter {
location = config.locationType;
rootURL = config.rootURL;
};

Router.map(function () {
this.route('public-pages', { path: '' }, function () {
this.route('docs', function () {
// Getting started
// index.hbs is "Overview"
this.route('installation');
this.route('how-to-use-it');
this.route('dropdown-events');
this.route('trigger-events');
this.route('content-events');

// Basic customization
this.route('position');
this.route('disabled');
this.route('overlays');
this.route('styles');

// Advanced customization
this.route('custom-position');
this.route('animations');

// Other
this.route('test-helpers');
this.route('api-reference');
});

this.route('cookbook', function () {
this.route('no-trigger');
});

this.route('addons', function () {});

this.route('support-the-project');
});

this.route('scrolling-container');
this.route('helpers-testing');
});

export default Router;
Empty file added docs/app/routes/.gitkeep
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions docs/app/styles/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Basic dropdown
@import 'ember-basic-dropdown';

@import 'variables';
@import 'base';
@import 'utilities';
@import 'layout';

// Components
@import 'components/main-header';
@import 'components/link-to-other-version';
@import 'components/main-footer';
@import 'components/index';
@import 'components/side-nav';
@import 'components/docs';
@import 'components/cookbook';
@import 'components/spinners';

// Looks and feels for examples
@import 'look-and-feels/animations';
@import 'look-and-feels/bootstrap';
@import 'look-and-feels/material';

// Demos
@import 'demos/content-mouse-enter-leave';
@import 'demos/position';
@import 'demos/scrollable-container';

// Docs
@import 'docs/code-example';

// Easter egg
@import 'brandification';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{outlet}}
1 change: 1 addition & 0 deletions docs/app/templates/components/autofocus-input.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<input type='text' {{this.focusInput}} ...attributes />
Loading

0 comments on commit bf229cf

Please sign in to comment.