├── .nvmrc
├── README.md
├── packages
├── test-app-defaults
│ ├── vendor
│ │ └── .gitkeep
│ ├── app
│ │ ├── helpers
│ │ │ └── .gitkeep
│ │ ├── models
│ │ │ └── .gitkeep
│ │ ├── routes
│ │ │ └── .gitkeep
│ │ ├── styles
│ │ │ └── app.css
│ │ ├── components
│ │ │ └── .gitkeep
│ │ ├── controllers
│ │ │ └── .gitkeep
│ │ ├── templates
│ │ │ └── application.hbs
│ │ ├── router.js
│ │ ├── app.js
│ │ └── index.html
│ ├── tests
│ │ ├── unit
│ │ │ └── .gitkeep
│ │ ├── integration
│ │ │ └── .gitkeep
│ │ ├── test-helper.js
│ │ ├── acceptance
│ │ │ └── check-tag-test.js
│ │ ├── index.html
│ │ └── helpers
│ │ │ └── index.js
│ ├── public
│ │ └── robots.txt
│ ├── .prettierrc.js
│ ├── .template-lintrc.js
│ ├── config
│ │ ├── optional-features.json
│ │ ├── targets.js
│ │ ├── ember-cli-update.json
│ │ ├── environment.js
│ │ └── ember-try.js
│ ├── .eslintignore
│ ├── .prettierignore
│ ├── .ember-cli
│ ├── .gitignore
│ ├── testem.js
│ ├── ember-cli-build.js
│ ├── .eslintrc.js
│ └── package.json
├── test-app-custom-config
│ ├── vendor
│ │ └── .gitkeep
│ ├── app
│ │ ├── helpers
│ │ │ └── .gitkeep
│ │ ├── models
│ │ │ └── .gitkeep
│ │ ├── routes
│ │ │ └── .gitkeep
│ │ ├── styles
│ │ │ └── app.css
│ │ ├── components
│ │ │ └── .gitkeep
│ │ ├── controllers
│ │ │ └── .gitkeep
│ │ ├── templates
│ │ │ └── application.hbs
│ │ ├── router.js
│ │ ├── app.js
│ │ └── index.html
│ ├── tests
│ │ ├── unit
│ │ │ └── .gitkeep
│ │ ├── integration
│ │ │ └── .gitkeep
│ │ ├── test-helper.js
│ │ ├── acceptance
│ │ │ └── check-tag-test.js
│ │ ├── index.html
│ │ └── helpers
│ │ │ └── index.js
│ ├── public
│ │ └── robots.txt
│ ├── .prettierrc.js
│ ├── .template-lintrc.js
│ ├── config
│ │ ├── optional-features.json
│ │ ├── targets.js
│ │ ├── ember-cli-update.json
│ │ ├── environment.js
│ │ └── ember-try.js
│ ├── .eslintignore
│ ├── .prettierignore
│ ├── .ember-cli
│ ├── .gitignore
│ ├── testem.js
│ ├── ember-cli-build.js
│ ├── .eslintrc.js
│ └── package.json
└── ember-noscript
│ ├── .prettierrc.js
│ ├── .gitignore
│ ├── lib
│ └── strings.js
│ ├── .eslintignore
│ ├── .prettierignore
│ ├── .npmignore
│ ├── LICENSE.md
│ ├── .eslintrc.js
│ ├── package.json
│ ├── index.js
│ └── README.md
├── LICENSE.md
├── .gitignore
├── .editorconfig
├── CONTRIBUTING.md
├── .github
├── workflows
│ ├── tag_version.yaml
│ ├── release.yaml
│ ├── auto-merge.yml
│ ├── create_release.yaml
│ └── ci.yml
└── dependabot.yml
└── package.json
/.nvmrc:
--------------------------------------------------------------------------------
1 | 16
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | packages/ember-noscript/README.md
--------------------------------------------------------------------------------
/packages/test-app-defaults/vendor/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | packages/ember-noscript/LICENSE.md
--------------------------------------------------------------------------------
/packages/test-app-custom-config/vendor/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/helpers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/models/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/routes/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/styles/app.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/tests/unit/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/helpers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/models/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/routes/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/styles/app.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/tests/unit/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/components/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/controllers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/tests/integration/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/components/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/controllers/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/tests/integration/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/templates/application.hbs:
--------------------------------------------------------------------------------
1 | Test that defaults are applied
--------------------------------------------------------------------------------
/packages/test-app-defaults/public/robots.txt:
--------------------------------------------------------------------------------
1 | # http://www.robotstxt.org
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/templates/application.hbs:
--------------------------------------------------------------------------------
1 | Test that the noscript tag is placed in the body
--------------------------------------------------------------------------------
/packages/test-app-custom-config/public/robots.txt:
--------------------------------------------------------------------------------
1 | # http://www.robotstxt.org
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/packages/ember-noscript/.prettierrc.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | singleQuote: true,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/.prettierrc.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | singleQuote: true,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/.prettierrc.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | singleQuote: true,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/.template-lintrc.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | extends: 'recommended',
5 | };
6 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/.template-lintrc.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | extends: 'recommended',
5 | };
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # misc
7 | /.env*
8 | npm-debug.log*
9 |
--------------------------------------------------------------------------------
/packages/ember-noscript/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /bower_components/
5 | /node_modules/
6 |
7 | # misc
8 | /.eslintcache
9 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/config/optional-features.json:
--------------------------------------------------------------------------------
1 | {
2 | "application-template-wrapper": false,
3 | "default-async-observers": true,
4 | "jquery-integration": false,
5 | "template-only-glimmer-components": true
6 | }
7 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/config/optional-features.json:
--------------------------------------------------------------------------------
1 | {
2 | "application-template-wrapper": false,
3 | "default-async-observers": true,
4 | "jquery-integration": false,
5 | "template-only-glimmer-components": true
6 | }
7 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/config/targets.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const browsers = [
4 | 'last 1 Chrome versions',
5 | 'last 1 Firefox versions',
6 | 'last 1 Safari versions',
7 | ];
8 |
9 | module.exports = {
10 | browsers,
11 | };
12 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/config/targets.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const browsers = [
4 | 'last 1 Chrome versions',
5 | 'last 1 Firefox versions',
6 | 'last 1 Safari versions',
7 | ];
8 |
9 | module.exports = {
10 | browsers,
11 | };
12 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/router.js:
--------------------------------------------------------------------------------
1 | import EmberRouter from '@ember/routing/router';
2 | import config from 'test-app-defaults/config/environment';
3 |
4 | export default class Router extends EmberRouter {
5 | location = config.locationType;
6 | rootURL = config.rootURL;
7 | }
8 |
9 | Router.map(function () {});
10 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/router.js:
--------------------------------------------------------------------------------
1 | import EmberRouter from '@ember/routing/router';
2 | import config from 'test-app-custom-config/config/environment';
3 |
4 | export default class Router extends EmberRouter {
5 | location = config.locationType;
6 | rootURL = config.rootURL;
7 | }
8 |
9 | Router.map(function () {});
10 |
--------------------------------------------------------------------------------
/packages/ember-noscript/lib/strings.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 | 'use strict';
3 |
4 | const defaultNoscriptContent = `
5 |
6 | For full functionality of this site it is necessary to enable JavaScript.
7 | Here are the
8 | instructions on how to enable JavaScript in your web browser.
9 |
10 | `;
11 |
12 | module.exports = { defaultNoscriptContent };
13 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/tests/test-helper.js:
--------------------------------------------------------------------------------
1 | import Application from 'test-app-defaults/app';
2 | import config from 'test-app-defaults/config/environment';
3 | import * as QUnit from 'qunit';
4 | import { setApplication } from '@ember/test-helpers';
5 | import { setup } from 'qunit-dom';
6 | import { start } from 'ember-qunit';
7 |
8 | setApplication(Application.create(config.APP));
9 |
10 | setup(QUnit.assert);
11 |
12 | start();
13 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/tests/test-helper.js:
--------------------------------------------------------------------------------
1 | import Application from 'test-app-custom-config/app';
2 | import config from 'test-app-custom-config/config/environment';
3 | import * as QUnit from 'qunit';
4 | import { setApplication } from '@ember/test-helpers';
5 | import { setup } from 'qunit-dom';
6 | import { start } from 'ember-qunit';
7 |
8 | setApplication(Application.create(config.APP));
9 |
10 | setup(QUnit.assert);
11 |
12 | start();
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 |
8 | [*]
9 | end_of_line = lf
10 | charset = utf-8
11 | trim_trailing_whitespace = true
12 | insert_final_newline = true
13 | indent_style = space
14 | indent_size = 2
15 |
16 | [*.hbs]
17 | insert_final_newline = false
18 |
19 | [*.{diff,md}]
20 | trim_trailing_whitespace = false
21 |
--------------------------------------------------------------------------------
/packages/ember-noscript/.eslintignore:
--------------------------------------------------------------------------------
1 | # unconventional js
2 | /blueprints/*/files/
3 | /vendor/
4 |
5 | # compiled output
6 | /dist/
7 | /tmp/
8 |
9 | # dependencies
10 | /bower_components/
11 | /node_modules/
12 |
13 | # misc
14 | /coverage/
15 | !.*
16 | .*/
17 | .eslintcache
18 |
19 | # ember-try
20 | /.node_modules.ember-try/
21 | /bower.json.ember-try
22 | /npm-shrinkwrap.json.ember-try
23 | /package.json.ember-try
24 | /package-lock.json.ember-try
25 | /yarn.lock.ember-try
--------------------------------------------------------------------------------
/packages/test-app-defaults/.eslintignore:
--------------------------------------------------------------------------------
1 | # unconventional js
2 | /blueprints/*/files/
3 | /vendor/
4 |
5 | # compiled output
6 | /dist/
7 | /tmp/
8 |
9 | # dependencies
10 | /bower_components/
11 | /node_modules/
12 |
13 | # misc
14 | /coverage/
15 | !.*
16 | .*/
17 | .eslintcache
18 |
19 | # ember-try
20 | /.node_modules.ember-try/
21 | /bower.json.ember-try
22 | /npm-shrinkwrap.json.ember-try
23 | /package.json.ember-try
24 | /package-lock.json.ember-try
25 | /yarn.lock.ember-try
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/app.js:
--------------------------------------------------------------------------------
1 | import Application from '@ember/application';
2 | import Resolver from 'ember-resolver';
3 | import loadInitializers from 'ember-load-initializers';
4 | import config from 'test-app-defaults/config/environment';
5 |
6 | export default class App extends Application {
7 | modulePrefix = config.modulePrefix;
8 | podModulePrefix = config.podModulePrefix;
9 | Resolver = Resolver;
10 | }
11 |
12 | loadInitializers(App, config.modulePrefix);
13 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/.eslintignore:
--------------------------------------------------------------------------------
1 | # unconventional js
2 | /blueprints/*/files/
3 | /vendor/
4 |
5 | # compiled output
6 | /dist/
7 | /tmp/
8 |
9 | # dependencies
10 | /bower_components/
11 | /node_modules/
12 |
13 | # misc
14 | /coverage/
15 | !.*
16 | .*/
17 | .eslintcache
18 |
19 | # ember-try
20 | /.node_modules.ember-try/
21 | /bower.json.ember-try
22 | /npm-shrinkwrap.json.ember-try
23 | /package.json.ember-try
24 | /package-lock.json.ember-try
25 | /yarn.lock.ember-try
--------------------------------------------------------------------------------
/packages/ember-noscript/.prettierignore:
--------------------------------------------------------------------------------
1 | # unconventional js
2 | /blueprints/*/files/
3 | /vendor/
4 |
5 | # compiled output
6 | /dist/
7 | /tmp/
8 |
9 | # dependencies
10 | /bower_components/
11 | /node_modules/
12 |
13 | # misc
14 | /coverage/
15 | !.*
16 | .eslintcache
17 | .lint-todo/
18 |
19 | # ember-try
20 | /.node_modules.ember-try/
21 | /bower.json.ember-try
22 | /npm-shrinkwrap.json.ember-try
23 | /package.json.ember-try
24 | /package-lock.json.ember-try
25 | /yarn.lock.ember-try
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/app.js:
--------------------------------------------------------------------------------
1 | import Application from '@ember/application';
2 | import Resolver from 'ember-resolver';
3 | import loadInitializers from 'ember-load-initializers';
4 | import config from 'test-app-custom-config/config/environment';
5 |
6 | export default class App extends Application {
7 | modulePrefix = config.modulePrefix;
8 | podModulePrefix = config.podModulePrefix;
9 | Resolver = Resolver;
10 | }
11 |
12 | loadInitializers(App, config.modulePrefix);
13 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/.prettierignore:
--------------------------------------------------------------------------------
1 | # unconventional js
2 | /blueprints/*/files/
3 | /vendor/
4 |
5 | # compiled output
6 | /dist/
7 | /tmp/
8 |
9 | # dependencies
10 | /bower_components/
11 | /node_modules/
12 |
13 | # misc
14 | /coverage/
15 | !.*
16 | .eslintcache
17 | .lint-todo/
18 |
19 | # ember-try
20 | /.node_modules.ember-try/
21 | /bower.json.ember-try
22 | /npm-shrinkwrap.json.ember-try
23 | /package.json.ember-try
24 | /package-lock.json.ember-try
25 | /yarn.lock.ember-try
--------------------------------------------------------------------------------
/packages/test-app-custom-config/.prettierignore:
--------------------------------------------------------------------------------
1 | # unconventional js
2 | /blueprints/*/files/
3 | /vendor/
4 |
5 | # compiled output
6 | /dist/
7 | /tmp/
8 |
9 | # dependencies
10 | /bower_components/
11 | /node_modules/
12 |
13 | # misc
14 | /coverage/
15 | !.*
16 | .eslintcache
17 | .lint-todo/
18 |
19 | # ember-try
20 | /.node_modules.ember-try/
21 | /bower.json.ember-try
22 | /npm-shrinkwrap.json.ember-try
23 | /package.json.ember-try
24 | /package-lock.json.ember-try
25 | /yarn.lock.ember-try
--------------------------------------------------------------------------------
/packages/test-app-defaults/config/ember-cli-update.json:
--------------------------------------------------------------------------------
1 | {
2 | "schemaVersion": "1.0.0",
3 | "packages": [
4 | {
5 | "name": "ember-cli",
6 | "version": "4.4.0",
7 | "blueprints": [
8 | {
9 | "name": "app",
10 | "outputRepo": "https://github.com/ember-cli/ember-new-output",
11 | "codemodsSource": "ember-app-codemods-manifest@1",
12 | "isBaseBlueprint": true,
13 | "options": [
14 | "--ci-provider=github"
15 | ]
16 | }
17 | ]
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/packages/ember-noscript/.npmignore:
--------------------------------------------------------------------------------
1 | # compiled output
2 | /dist/
3 | /tmp/
4 |
5 | # dependencies
6 | /bower_components/
7 |
8 | # misc
9 | /.bowerrc
10 | /.editorconfig
11 | /.ember-cli
12 | /.env*
13 | /.eslintignore
14 | /.eslintrc.js
15 | /.gitignore
16 | /.template-lintrc.js
17 | /.travis.yml
18 | /.watchmanconfig
19 | /bower.json
20 | /config/ember-try.js
21 | /CONTRIBUTING.md
22 | /ember-cli-build.js
23 | /testem.js
24 | /tests/
25 | /yarn.lock
26 | .gitkeep
27 |
28 | # ember-try
29 | .node_modules.ember-try/
30 | bower.json.ember-try
31 | package.json.ember-try
32 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/config/ember-cli-update.json:
--------------------------------------------------------------------------------
1 | {
2 | "schemaVersion": "1.0.0",
3 | "packages": [
4 | {
5 | "name": "ember-cli",
6 | "version": "4.4.0",
7 | "blueprints": [
8 | {
9 | "name": "app",
10 | "outputRepo": "https://github.com/ember-cli/ember-new-output",
11 | "codemodsSource": "ember-app-codemods-manifest@1",
12 | "isBaseBlueprint": true,
13 | "options": [
14 | "--ci-provider=github"
15 | ]
16 | }
17 | ]
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/tests/acceptance/check-tag-test.js:
--------------------------------------------------------------------------------
1 | import { module, test } from 'qunit';
2 | import { visit } from '@ember/test-helpers';
3 | import { setupApplicationTest } from 'ember-qunit';
4 |
5 | module('Acceptance | check tag', function (hooks) {
6 | setupApplicationTest(hooks);
7 |
8 | test('that noscript tag is placed in the header', async function (assert) {
9 | await visit('/');
10 | const el = document.querySelector('head noscript');
11 | assert.ok(el);
12 | assert.ok(el.textContent.includes('javascript'));
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/tests/acceptance/check-tag-test.js:
--------------------------------------------------------------------------------
1 | import { module, test } from 'qunit';
2 | import { visit } from '@ember/test-helpers';
3 | import { setupApplicationTest } from 'ember-qunit';
4 |
5 | module('Acceptance | check tag', function (hooks) {
6 | setupApplicationTest(hooks);
7 |
8 | test('that noscript tag is placed in the body', async function (assert) {
9 | await visit('/');
10 | const el = document.querySelector('body noscript');
11 | assert.ok(el);
12 | assert.strictEqual(el.textContent, 'No script stuff');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | /**
3 | Ember CLI sends analytics information by default. The data is completely
4 | anonymous, but there are times when you might want to disable this behavior.
5 |
6 | Setting `disableAnalytics` to true will prevent any data from being sent.
7 | */
8 | "disableAnalytics": false,
9 |
10 | /**
11 | Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12 | rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
13 | */
14 | "isTypeScriptProject": false
15 | }
16 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/.ember-cli:
--------------------------------------------------------------------------------
1 | {
2 | /**
3 | Ember CLI sends analytics information by default. The data is completely
4 | anonymous, but there are times when you might want to disable this behavior.
5 |
6 | Setting `disableAnalytics` to true will prevent any data from being sent.
7 | */
8 | "disableAnalytics": false,
9 |
10 | /**
11 | Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12 | rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
13 | */
14 | "isTypeScriptProject": false
15 | }
16 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist/
5 | /tmp/
6 |
7 | # dependencies
8 | /bower_components/
9 | /node_modules/
10 |
11 | # misc
12 | /.env*
13 | /.pnp*
14 | /.sass-cache
15 | /.eslintcache
16 | /connect.lock
17 | /coverage/
18 | /libpeerconnection.log
19 | /npm-debug.log*
20 | /testem.log
21 | /yarn-error.log
22 |
23 | # ember-try
24 | /.node_modules.ember-try/
25 | /bower.json.ember-try
26 | /npm-shrinkwrap.json.ember-try
27 | /package.json.ember-try
28 | /package-lock.json.ember-try
29 | /yarn.lock.ember-try
30 |
31 | # broccoli-debug
32 | /DEBUG/
33 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist/
5 | /tmp/
6 |
7 | # dependencies
8 | /bower_components/
9 | /node_modules/
10 |
11 | # misc
12 | /.env*
13 | /.pnp*
14 | /.sass-cache
15 | /.eslintcache
16 | /connect.lock
17 | /coverage/
18 | /libpeerconnection.log
19 | /npm-debug.log*
20 | /testem.log
21 | /yarn-error.log
22 |
23 | # ember-try
24 | /.node_modules.ember-try/
25 | /bower.json.ember-try
26 | /npm-shrinkwrap.json.ember-try
27 | /package.json.ember-try
28 | /package-lock.json.ember-try
29 | /yarn.lock.ember-try
30 |
31 | # broccoli-debug
32 | /DEBUG/
33 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/testem.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | test_page: 'tests/index.html?hidepassed',
5 | disable_watching: true,
6 | launch_in_ci: ['Chrome'],
7 | launch_in_dev: ['Chrome'],
8 | browser_start_timeout: 120,
9 | browser_args: {
10 | Chrome: {
11 | ci: [
12 | // --no-sandbox is needed when running Chrome inside a container
13 | process.env.CI ? '--no-sandbox' : null,
14 | '--headless',
15 | '--disable-dev-shm-usage',
16 | '--disable-software-rasterizer',
17 | '--mute-audio',
18 | '--remote-debugging-port=0',
19 | '--window-size=1440,900',
20 | ].filter(Boolean),
21 | },
22 | },
23 | };
24 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/testem.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | test_page: 'tests/index.html?hidepassed',
5 | disable_watching: true,
6 | launch_in_ci: ['Chrome'],
7 | launch_in_dev: ['Chrome'],
8 | browser_start_timeout: 120,
9 | browser_args: {
10 | Chrome: {
11 | ci: [
12 | // --no-sandbox is needed when running Chrome inside a container
13 | process.env.CI ? '--no-sandbox' : null,
14 | '--headless',
15 | '--disable-dev-shm-usage',
16 | '--disable-software-rasterizer',
17 | '--mute-audio',
18 | '--remote-debugging-port=0',
19 | '--window-size=1440,900',
20 | ].filter(Boolean),
21 | },
22 | },
23 | };
24 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How To Contribute
2 |
3 | ## Installation
4 |
5 | * `git clone `
6 | * `cd my-addon`
7 | * `npm install`
8 |
9 | ## Linting
10 |
11 | * `npm run lint:hbs`
12 | * `npm run lint:js`
13 | * `npm run lint:js -- --fix`
14 |
15 | ## Running tests
16 |
17 | * `ember test` – Runs the test suite on the current Ember version
18 | * `ember test --server` – Runs the test suite in "watch mode"
19 | * `ember try:each` – Runs the test suite against multiple Ember versions
20 |
21 | ## Running the dummy application
22 |
23 | * `ember serve`
24 | * Visit the dummy application at [http://localhost:4200](http://localhost:4200).
25 |
26 | For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
--------------------------------------------------------------------------------
/packages/test-app-defaults/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | TestAppDefaults
6 |
7 |
8 |
9 | {{content-for "head"}}
10 |
11 |
12 |
13 |
14 | {{content-for "head-footer"}}
15 |
16 |
17 | {{content-for "body"}}
18 |
19 |
20 |
21 |
22 | {{content-for "body-footer"}}
23 |
24 |
25 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | TestAppCustomConfig
6 |
7 |
8 |
9 | {{content-for "head"}}
10 |
11 |
12 |
13 |
14 | {{content-for "head-footer"}}
15 |
16 |
17 | {{content-for "body"}}
18 |
19 |
20 |
21 |
22 | {{content-for "body-footer"}}
23 |
24 |
25 |
--------------------------------------------------------------------------------
/.github/workflows/tag_version.yaml:
--------------------------------------------------------------------------------
1 | name: Tag Version
2 |
3 | on:
4 | workflow_dispatch:
5 | inputs:
6 | releaseType:
7 | description: 'Semver Release Type (major,minor,patch)'
8 | required: true
9 |
10 | jobs:
11 | tag:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v3
15 | with:
16 | token: ${{ secrets.MY_TOKEN }}
17 | - name: Validate releaseType
18 | run: npx in-string-list ${{ github.event.inputs.releaseType }} major,minor,patch
19 | - name: Setup Git
20 | run: |
21 | git config user.name Zorgbort
22 | git config user.email info@iliosproject.org
23 | - name: Increment Version
24 | run: npm version ${{ github.event.inputs.releaseType }}
25 | - name: Push Changes
26 | run: git push --follow-tags
--------------------------------------------------------------------------------
/packages/test-app-defaults/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function (defaults) {
6 | let app = new EmberApp(defaults, {
7 | // Add options here
8 | });
9 |
10 | // Use `app.import` to add additional libraries to the generated
11 | // output files.
12 | //
13 | // If you need to use different assets in different
14 | // environments, specify an object as the first parameter. That
15 | // object's keys should be the environment name and the values
16 | // should be the asset to use in that environment.
17 | //
18 | // If the library that you are including contains AMD or ES6
19 | // modules that you would like to import into your application
20 | // please specify an object with the list of modules as keys
21 | // along with the exports of each module as its value.
22 |
23 | return app.toTree();
24 | };
25 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/ember-cli-build.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const EmberApp = require('ember-cli/lib/broccoli/ember-app');
4 |
5 | module.exports = function (defaults) {
6 | let app = new EmberApp(defaults, {
7 | // Add options here
8 | });
9 |
10 | // Use `app.import` to add additional libraries to the generated
11 | // output files.
12 | //
13 | // If you need to use different assets in different
14 | // environments, specify an object as the first parameter. That
15 | // object's keys should be the environment name and the values
16 | // should be the asset to use in that environment.
17 | //
18 | // If the library that you are including contains AMD or ES6
19 | // modules that you would like to import into your application
20 | // please specify an object with the list of modules as keys
21 | // along with the exports of each module as its value.
22 |
23 | return app.toTree();
24 | };
25 |
--------------------------------------------------------------------------------
/.github/workflows/release.yaml:
--------------------------------------------------------------------------------
1 | name: Publish NPM Package
2 |
3 | on:
4 | release:
5 | types: [published]
6 |
7 | jobs:
8 | test:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v3
12 | - uses: actions/setup-node@v3
13 | with:
14 | node-version: 16
15 | - name: install dependencies
16 | run: npm ci --ignore-scripts
17 | - name: test
18 | run: npm run test
19 |
20 | publish-npm:
21 | needs: build
22 | runs-on: ubuntu-latest
23 | steps:
24 | - uses: actions/checkout@v3
25 | - uses: actions/setup-node@v3
26 | with:
27 | node-version: 16
28 | registry-url: https://registry.npmjs.org/
29 | - name: install dependencies
30 | run: npm ci --ignore-scripts
31 | - name: publish
32 | run: npm publish
33 | env:
34 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
35 | working-directory: packages/ember-noscript
36 |
--------------------------------------------------------------------------------
/packages/ember-noscript/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "workspaces": [
4 | "packages/*"
5 | ],
6 | "license": "MIT",
7 | "author": "Jonathan Johnson",
8 | "scripts": {
9 | "test": "npm-run-all test:*",
10 | "lint": "npm-run-all lint:*",
11 | "test:addon": "npm run -w ember-noscript test",
12 | "lint:addon": "npm run -w ember-noscript test",
13 | "start:test-app-custom-config": "npm run -w test-app-custom-config start",
14 | "test:test-app-custom-config": "npm run -w test-app-custom-config test",
15 | "lint:test-app-custom-config": "npm run -w test-app-custom-config lint",
16 | "start:test-app-defaults": "npm run -w test-app-defaults start",
17 | "test:test-app-defaults": "npm run -w test-app-defaults test",
18 | "lint:test-app-defaults": "npm run -w test-app-defaults lint"
19 | },
20 | "devDependencies": {
21 | "npm-run-all": "4.1.5",
22 | "pre-commit": "^1.2.2"
23 | },
24 | "repository": "https://github.com/jrjohnson/ember-noscript.git",
25 | "engines": {
26 | "node": ">= 16",
27 | "npm": ">= 7"
28 | },
29 | "pre-commit": [
30 | "lint"
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/.github/workflows/auto-merge.yml:
--------------------------------------------------------------------------------
1 | name: Dependabot auto-merge
2 | on: pull_request_target
3 | permissions:
4 | pull-requests: write
5 | contents: write
6 | jobs:
7 | dependabot:
8 | runs-on: ubuntu-latest
9 | if: ${{ github.actor == 'dependabot[bot]' }}
10 | steps:
11 | - name: Dependabot metadata
12 | id: metadata
13 | uses: dependabot/fetch-metadata@v1
14 | with:
15 | github-token: "${{ secrets.GITHUB_TOKEN }}"
16 | - name: Output Checks
17 | run: |
18 | echo ${{steps.metadata.outputs.dependency-names}}
19 | echo ${{steps.metadata.outputs.update-type}}
20 | echo ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
21 | echo ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
22 | - name: Enable auto-merge for minor and patch updates
23 | if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
24 | run: gh pr merge --auto --merge "$PR_URL"
25 | env:
26 | PR_URL: ${{github.event.pull_request.html_url}}
27 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
--------------------------------------------------------------------------------
/packages/ember-noscript/.eslintrc.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | root: true,
5 | parser: 'babel-eslint',
6 | parserOptions: {
7 | ecmaVersion: 2018,
8 | sourceType: 'module',
9 | ecmaFeatures: {
10 | legacyDecorators: true,
11 | },
12 | },
13 | plugins: ['ember'],
14 | extends: [
15 | 'eslint:recommended',
16 | 'plugin:ember/recommended',
17 | 'plugin:prettier/recommended',
18 | ],
19 | env: {
20 | browser: true,
21 | },
22 | rules: {},
23 | overrides: [
24 | // node files
25 | {
26 | files: [
27 | './.eslintrc.js',
28 | './.prettierrc.js',
29 | './.template-lintrc.js',
30 | './ember-cli-build.js',
31 | './index.js',
32 | './testem.js',
33 | './blueprints/*/index.js',
34 | './config/**/*.js',
35 | './tests/dummy/config/**/*.js',
36 | ],
37 | parserOptions: {
38 | sourceType: 'script',
39 | },
40 | env: {
41 | browser: false,
42 | node: true,
43 | },
44 | plugins: ['node'],
45 | extends: ['plugin:node/recommended'],
46 | },
47 | {
48 | // test files
49 | files: ['tests/**/*-test.{js,ts}'],
50 | extends: ['plugin:qunit/recommended'],
51 | },
52 | ],
53 | };
54 |
--------------------------------------------------------------------------------
/.github/workflows/create_release.yaml:
--------------------------------------------------------------------------------
1 | name: Release Notes
2 |
3 | on:
4 | push:
5 | tags:
6 | - '*'
7 |
8 | jobs:
9 | notes:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v3
13 | with:
14 | fetch-depth: 0
15 | - name: Get Previous Tag
16 | id: previousTag
17 | run: |
18 | PREVIOUS_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))
19 | echo ${PREVIOUS_TAG}
20 | echo ::set-output name=tag::${PREVIOUS_TAG}
21 | - name: Get New Tag
22 | id: nextTag
23 | run: |
24 | NEW_TAG=${GITHUB_REF#refs/tags/}
25 | echo ${NEW_TAG}
26 | echo ::set-output name=tag::${NEW_TAG}
27 | - uses: actions/setup-node@v3
28 | - name: Generate Release Notes
29 | id: notes
30 | run: |
31 | NOTES=$(npx generate-github-release-notes jrjohnson ember-noscript ${{ steps.previousTag.outputs.tag }} ${{steps.nextTag.outputs.tag}})
32 | echo ${NOTES}
33 | # remove line breaks from notes so they can be passed around
34 | NOTES="${NOTES//$'\n'/'%0A'}"
35 | echo "::set-output name=releaseNotes::$NOTES"
36 | - uses: ncipollo/release-action@v1
37 | with:
38 | body: ${{steps.notes.outputs.releaseNotes}}
39 | token: ${{ secrets.MY_TOKEN }}
--------------------------------------------------------------------------------
/packages/test-app-defaults/tests/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | TestAppDefaults Tests
6 |
7 |
8 |
9 | {{content-for "head"}}
10 | {{content-for "test-head"}}
11 |
12 |
13 |
14 |
15 |
16 | {{content-for "head-footer"}}
17 | {{content-for "test-head-footer"}}
18 |
19 |
20 | {{content-for "body"}}
21 | {{content-for "test-body"}}
22 |
23 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | {{content-for "body-footer"}}
37 | {{content-for "test-body-footer"}}
38 |
39 |
40 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/tests/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | TestAppCustomConfig Tests
6 |
7 |
8 |
9 | {{content-for "head"}}
10 | {{content-for "test-head"}}
11 |
12 |
13 |
14 |
15 |
16 | {{content-for "head-footer"}}
17 | {{content-for "test-head-footer"}}
18 |
19 |
20 | {{content-for "body"}}
21 | {{content-for "test-body"}}
22 |
23 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | {{content-for "body-footer"}}
37 | {{content-for "test-body-footer"}}
38 |
39 |
40 |
--------------------------------------------------------------------------------
/packages/ember-noscript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ember-noscript",
3 | "version": "4.1.0",
4 | "description": "Place a noscript tag in your ember-cli app.",
5 | "keywords": [
6 | "ember-addon",
7 | "noscript"
8 | ],
9 | "license": "MIT",
10 | "author": "Jonathan Johnson",
11 | "repository": "https://github.com/jrjohnson/ember-noscript.git",
12 | "scripts": {
13 | "test": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
14 | "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
15 | "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
16 | "lint:js": "eslint . --cache",
17 | "lint:js:fix": "eslint . --fix"
18 | },
19 | "devDependencies": {
20 | "babel-eslint": "^10.1.0",
21 | "eslint": "^7.32.0",
22 | "eslint-config-prettier": "^8.5.0",
23 | "eslint-plugin-ember": "^10.6.1",
24 | "eslint-plugin-node": "^11.1.0",
25 | "eslint-plugin-prettier": "^4.0.0",
26 | "eslint-plugin-qunit": "^7.2.0",
27 | "npm-run-all": "^4.1.5",
28 | "prettier": "^2.6.2"
29 | },
30 | "engines": {
31 | "node": "12.* || 14.* || >= 16"
32 | },
33 | "ember": {
34 | "edition": "octane"
35 | },
36 | "files": [
37 | "README.md",
38 | "LICENSE.md",
39 | "index.js",
40 | "ember-cli-build.js",
41 | "config/",
42 | "lib/"
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/tests/helpers/index.js:
--------------------------------------------------------------------------------
1 | import {
2 | setupApplicationTest as upstreamSetupApplicationTest,
3 | setupRenderingTest as upstreamSetupRenderingTest,
4 | setupTest as upstreamSetupTest,
5 | } from 'ember-qunit';
6 |
7 | // This file exists to provide wrappers around ember-qunit's / ember-mocha's
8 | // test setup functions. This way, you can easily extend the setup that is
9 | // needed per test type.
10 |
11 | function setupApplicationTest(hooks, options) {
12 | upstreamSetupApplicationTest(hooks, options);
13 |
14 | // Additional setup for application tests can be done here.
15 | //
16 | // For example, if you need an authenticated session for each
17 | // application test, you could do:
18 | //
19 | // hooks.beforeEach(async function () {
20 | // await authenticateSession(); // ember-simple-auth
21 | // });
22 | //
23 | // This is also a good place to call test setup functions coming
24 | // from other addons:
25 | //
26 | // setupIntl(hooks); // ember-intl
27 | // setupMirage(hooks); // ember-cli-mirage
28 | }
29 |
30 | function setupRenderingTest(hooks, options) {
31 | upstreamSetupRenderingTest(hooks, options);
32 |
33 | // Additional setup for rendering tests can be done here.
34 | }
35 |
36 | function setupTest(hooks, options) {
37 | upstreamSetupTest(hooks, options);
38 |
39 | // Additional setup for unit tests can be done here.
40 | }
41 |
42 | export { setupApplicationTest, setupRenderingTest, setupTest };
43 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/tests/helpers/index.js:
--------------------------------------------------------------------------------
1 | import {
2 | setupApplicationTest as upstreamSetupApplicationTest,
3 | setupRenderingTest as upstreamSetupRenderingTest,
4 | setupTest as upstreamSetupTest,
5 | } from 'ember-qunit';
6 |
7 | // This file exists to provide wrappers around ember-qunit's / ember-mocha's
8 | // test setup functions. This way, you can easily extend the setup that is
9 | // needed per test type.
10 |
11 | function setupApplicationTest(hooks, options) {
12 | upstreamSetupApplicationTest(hooks, options);
13 |
14 | // Additional setup for application tests can be done here.
15 | //
16 | // For example, if you need an authenticated session for each
17 | // application test, you could do:
18 | //
19 | // hooks.beforeEach(async function () {
20 | // await authenticateSession(); // ember-simple-auth
21 | // });
22 | //
23 | // This is also a good place to call test setup functions coming
24 | // from other addons:
25 | //
26 | // setupIntl(hooks); // ember-intl
27 | // setupMirage(hooks); // ember-cli-mirage
28 | }
29 |
30 | function setupRenderingTest(hooks, options) {
31 | upstreamSetupRenderingTest(hooks, options);
32 |
33 | // Additional setup for rendering tests can be done here.
34 | }
35 |
36 | function setupTest(hooks, options) {
37 | upstreamSetupTest(hooks, options);
38 |
39 | // Additional setup for unit tests can be done here.
40 | }
41 |
42 | export { setupApplicationTest, setupRenderingTest, setupTest };
43 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/config/environment.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function (environment) {
4 | let ENV = {
5 | modulePrefix: 'test-app-defaults',
6 | environment,
7 | rootURL: '/',
8 | locationType: 'history',
9 | EmberENV: {
10 | FEATURES: {
11 | // Here you can enable experimental features on an ember canary build
12 | // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
13 | },
14 | EXTEND_PROTOTYPES: {
15 | // Prevent Ember Data from overriding Date.parse.
16 | Date: false,
17 | },
18 | },
19 |
20 | APP: {
21 | // Here you can pass flags/options to your application instance
22 | // when it is created
23 | },
24 | };
25 |
26 | if (environment === 'development') {
27 | // ENV.APP.LOG_RESOLVER = true;
28 | // ENV.APP.LOG_ACTIVE_GENERATION = true;
29 | // ENV.APP.LOG_TRANSITIONS = true;
30 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
31 | // ENV.APP.LOG_VIEW_LOOKUPS = true;
32 | }
33 |
34 | if (environment === 'test') {
35 | // Testem prefers this...
36 | ENV.locationType = 'none';
37 |
38 | // keep test console output quieter
39 | ENV.APP.LOG_ACTIVE_GENERATION = false;
40 | ENV.APP.LOG_VIEW_LOOKUPS = false;
41 |
42 | ENV.APP.rootElement = '#ember-testing';
43 | ENV.APP.autoboot = false;
44 | }
45 |
46 | if (environment === 'production') {
47 | // here you can enable a production-specific feature
48 | }
49 |
50 | return ENV;
51 | };
52 |
--------------------------------------------------------------------------------
/packages/test-app-defaults/.eslintrc.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | root: true,
5 | parser: 'babel-eslint',
6 | parserOptions: {
7 | ecmaVersion: 2018,
8 | sourceType: 'module',
9 | ecmaFeatures: {
10 | legacyDecorators: true,
11 | },
12 | },
13 | plugins: ['ember'],
14 | extends: [
15 | 'eslint:recommended',
16 | 'plugin:ember/recommended',
17 | 'plugin:prettier/recommended',
18 | ],
19 | env: {
20 | browser: true,
21 | },
22 | rules: {},
23 | overrides: [
24 | // node files
25 | {
26 | files: [
27 | './.eslintrc.js',
28 | './.prettierrc.js',
29 | './.template-lintrc.js',
30 | './ember-cli-build.js',
31 | './testem.js',
32 | './blueprints/*/index.js',
33 | './config/**/*.js',
34 | './lib/*/index.js',
35 | './server/**/*.js',
36 | ],
37 | parserOptions: {
38 | sourceType: 'script',
39 | },
40 | env: {
41 | browser: false,
42 | node: true,
43 | },
44 | plugins: ['node'],
45 | extends: ['plugin:node/recommended'],
46 | rules: {
47 | // this can be removed once the following is fixed
48 | // https://github.com/mysticatea/eslint-plugin-node/issues/77
49 | 'node/no-unpublished-require': 'off',
50 | },
51 | },
52 | {
53 | // test files
54 | files: ['tests/**/*-test.{js,ts}'],
55 | extends: ['plugin:qunit/recommended'],
56 | },
57 | ],
58 | };
59 |
--------------------------------------------------------------------------------
/packages/test-app-custom-config/.eslintrc.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = {
4 | root: true,
5 | parser: 'babel-eslint',
6 | parserOptions: {
7 | ecmaVersion: 2018,
8 | sourceType: 'module',
9 | ecmaFeatures: {
10 | legacyDecorators: true,
11 | },
12 | },
13 | plugins: ['ember'],
14 | extends: [
15 | 'eslint:recommended',
16 | 'plugin:ember/recommended',
17 | 'plugin:prettier/recommended',
18 | ],
19 | env: {
20 | browser: true,
21 | },
22 | rules: {},
23 | overrides: [
24 | // node files
25 | {
26 | files: [
27 | './.eslintrc.js',
28 | './.prettierrc.js',
29 | './.template-lintrc.js',
30 | './ember-cli-build.js',
31 | './testem.js',
32 | './blueprints/*/index.js',
33 | './config/**/*.js',
34 | './lib/*/index.js',
35 | './server/**/*.js',
36 | ],
37 | parserOptions: {
38 | sourceType: 'script',
39 | },
40 | env: {
41 | browser: false,
42 | node: true,
43 | },
44 | plugins: ['node'],
45 | extends: ['plugin:node/recommended'],
46 | rules: {
47 | // this can be removed once the following is fixed
48 | // https://github.com/mysticatea/eslint-plugin-node/issues/77
49 | 'node/no-unpublished-require': 'off',
50 | },
51 | },
52 | {
53 | // test files
54 | files: ['tests/**/*-test.{js,ts}'],
55 | extends: ['plugin:qunit/recommended'],
56 | },
57 | ],
58 | };
59 |
--------------------------------------------------------------------------------
/packages/ember-noscript/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const { defaultNoscriptContent } = require('./lib/strings');
4 |
5 | module.exports = {
6 | name: require('./package').name,
7 | isConfigChecked: false,
8 | config(env, appConfig) {
9 | this.checkConfig(appConfig);
10 | },
11 | contentFor(type, config) {
12 | const placeIn = this.getValueForPlaceIn(config);
13 | const content = this.getValueForContent(config);
14 | if (type === placeIn) {
15 | return ``;
16 | }
17 | },
18 | getValueForContent(config) {
19 | if ('noScript' in config) {
20 | if ('content' in config.noScript) {
21 | return config.noScript.content;
22 | }
23 | }
24 |
25 | return defaultNoscriptContent;
26 | },
27 | getValueForPlaceIn(config) {
28 | if ('noScript' in config) {
29 | if ('placeIn' in config.noScript) {
30 | return config.noScript.placeIn;
31 | }
32 | }
33 |
34 | return 'head';
35 | },
36 | checkConfig(appConfig) {
37 | //ensure we only check config once to avoid duplicate messages.
38 | if (this.isConfigChecked) {
39 | return;
40 | }
41 | this.isConfigChecked = true;
42 | if ('noScript' in appConfig) {
43 | if ('tag' in appConfig.noScript) {
44 | this.ui.writeWarnLine(`ember-noscript
45 | Specifying the 'tag' option in environment.js for "noScript" was removed in v4.0.0.
46 |